changeset 3361:4f40efa995c1

[project @ 1999-11-19 21:19:37 by jwe]
author jwe
date Fri, 19 Nov 1999 21:19:44 +0000
parents 48bd8127e19b
children 49ae660cdb39
files doc/interpreter/strings.txi doc/interpreter/struct.txi doc/interpreter/var.txi scripts/ChangeLog scripts/general/int2str.m scripts/general/num2str.m scripts/strings/blanks.m scripts/strings/deblank.m scripts/strings/dec2bin.m scripts/strings/dec2hex.m scripts/strings/findstr.m scripts/strings/hex2dec.m scripts/strings/index.m scripts/strings/rindex.m scripts/strings/split.m scripts/strings/str2mat.m scripts/strings/str2num.m scripts/strings/strcat.m scripts/strings/strcmp.m scripts/strings/strrep.m scripts/strings/substr.m src/ChangeLog src/data.cc src/help.cc src/mappers.cc src/ov.cc src/pt-decl.cc src/pt-mat.cc src/strfns.cc src/utils.cc src/variables.cc
diffstat 31 files changed, 736 insertions(+), 624 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/strings.txi	Fri Nov 19 05:15:27 1999 +0000
+++ b/doc/interpreter/strings.txi	Fri Nov 19 21:19:44 1999 +0000
@@ -122,299 +122,63 @@
 @node Creating Strings, Searching and Replacing, Strings, Strings
 @section Creating Strings
 
-@deftypefn {Function File} {} blanks (@var{n})
-Return a string of @var{n} blanks.
-@end deftypefn
-
-@deftypefn {Function File} {} int2str (@var{n})
-@deftypefnx {Function File} {} num2str (@var{x})
-Convert a number to a string.  These functions are not very flexible,
-but are provided for compatibility with @sc{Matlab}.  For better control
-over the results, use @code{sprintf} (@pxref{Formatted Output}).
-@end deftypefn
+@DOCSTRING(blanks)
 
-@deftypefn {Built-in Function} {} setstr (@var{x})
-Convert a matrix to a string.  Each element of the matrix is converted
-to the corresponding ASCII 
-character.  For example,
+@DOCSTRING(int2str)
 
-@example
-@group
-setstr ([97, 98, 99])
-     @result{} "abc"
-@end group
-@end example
-@end deftypefn
-
-@deftypefn {Function File} {} strcat (@var{s1}, @var{s2}, @dots{})
-Return a string containing all the arguments concatenated.  For example,
+@DOCSTRING(setstr)
 
-@example
-@group
-s = [ "ab"; "cde" ];
-strcat (s, s, s)
-     @result{} "ab ab ab "
-        "cdecdecde"
-@end group
-@end example
-@end deftypefn
+@DOCSTRING(strcat)
 
-@defvr {Built-in Variable} string_fill_char
-The value of this variable is used to pad all strings in a string matrix
-to the same length.  It should be a single character.  The default value
-is @code{" "} (a single space).  For example,
+@DOCSTRING(string_fill_char)
 
-@example
-@group
-string_fill_char = "X";
-[ "these"; "are"; "strings" ]
-     @result{} "theseXX"
-        "areXXXX"
-        "strings"
-@end group
-@end example
-@end defvr
+@DOCSTRING(str2mat)
 
-@deftypefn {Function File} {} str2mat (@var{s_1}, @dots{}, @var{s_n})
-Return a matrix containing the strings @var{s_1}, @dots{}, @var{s_n} as
-its rows.  Each string is padded with blanks in order to form a valid
-matrix.
-
-@strong{Note:}
-This function is modelled after @sc{Matlab}.  In Octave, you can create
-a matrix of strings by @code{[@var{s_1}; @dots{}; @var{s_n}]} even if
-the strings are not all the same length.
-@end deftypefn
-
-@deftypefn {Built-in Function} {} isstr (@var{a})
-Return 1 if @var{a} is a string.  Otherwise, return 0.
-@end deftypefn
+@DOCSTRING(isstr)
 
 @node Searching and Replacing, String Conversions, Creating Strings, Strings
 @section Searching and Replacing
 
-@deftypefn {Function File} {} deblank (@var{s})
-Removes the trailing blanks from the string @var{s}. 
-@end deftypefn
+@DOCSTRING(deblank)
 
-@deftypefn {Function File} {} findstr (@var{s}, @var{t}, @var{overlap})
-Return the vector of all positions in the longer of the two strings
-@var{s} and @var{t} where an occurrence of the shorter of the two starts.
-If the optional argument @var{overlap} is nonzero, the returned vector
-can include overlapping positions (this is the default).  For example,
-
-@example
-findstr ("ababab", "a")
-     @result{} [ 1, 3, 5 ]
-findstr ("abababa", "aba", 0)
-     @result{} [ 1, 5 ]
-@end example
-@end deftypefn
+@DOCSTRING(findstr)
 
-@deftypefn {Function File} {} index (@var{s}, @var{t})
-Return the position of the first occurrence of the string @var{t} in the
-string @var{s}, or 0 if no occurrence is found.  For example,
-
-@example
-index ("Teststring", "t")
-     @result{} 4
-@end example
-
-@strong{Note:}  This function does not work for arrays of strings.
-@end deftypefn
+@DOCSTRING(index)
 
-@deftypefn {Function File} {} rindex (@var{s}, @var{t})
-Return the position of the last occurrence of the string @var{t} in the
-string @var{s}, or 0 if no occurrence is found.  For example,
-
-@example
-rindex ("Teststring", "t")
-     @result{} 6
-@end example
-
-@strong{Note:}  This function does not work for arrays of strings.
-@end deftypefn
+@DOCSTRING(rindex)
 
-@deftypefn {Function File} {} split (@var{s}, @var{t})
-Divides the string @var{s} into pieces separated by @var{t}, returning
-the result in a string array (padded with blanks to form a valid
-matrix).  For example,
+@DOCSTRING(split)
 
-@example
-split ("Test string", "t")
-     @result{} "Tes "
-        " s  "
-        "ring"
-@end example
-@end deftypefn
-
-@deftypefn {Function File} {} strcmp (@var{s1}, @var{s2})
-Compares two strings, returning 1 if they are the same, and 0 otherwise.
-
-@strong{Note:}  For compatibility with @sc{Matlab}, Octave's strcmp
-function returns 1 if the strings are equal, and 0 otherwise.  This is
-just the opposite of the corresponding C library function.
-@end deftypefn
+@DOCSTRING(strcmp)
 
-@deftypefn {Function File} {} strrep (@var{s}, @var{x}, @var{y})
-Replaces all occurrences of the substring @var{x} of the string @var{s}
-with the string @var{y}.  For example,
-
-@example
-strrep ("This is a test string", "is", "&%$")
-     @result{} "Th&%$ &%$ a test string"
-@end example
-@end deftypefn
+@DOCSTRING(strrep)
 
-@deftypefn {Function File} {} substr (@var{s}, @var{beg}, @var{len})
-Return the substring of @var{s} which starts at character number
-@var{beg} and is @var{len} characters long.  For example,
-
-@example
-substr ("This is a test string", 6, 9)
-     @result{} "is a test"
-@end example
-
-@quotation
-@strong{Note:}
-This function is patterned after AWK.  You can get the same result by
-@code{@var{s} (@var{beg} : (@var{beg} + @var{len} - 1))}.  
-@end quotation
-@end deftypefn
+@DOCSTRING(substr)
 
 @node String Conversions, Character Class Functions, Searching and Replacing, Strings
 @section String Conversions
 
-@deftypefn {Function File} {} bin2dec (@var{s})
-Return a decimal number corresponding to the binary number
-represented as a string of zeros and ones.  For example,
-
-@example
-bin2dec ("1110")
-     @result{} 14
-@end example
-@end deftypefn
-
-@deftypefn {Function File} {} dec2bin (@var{n})
-Return a binary number corresponding the nonnegative decimal number
-@var{n}, as a string of ones and zeros.  For example,
+@DOCSTRING(bin2dec)
 
-@example
-dec2bin (14)
-     @result{} "1110"
-@end example
-@end deftypefn
-
-@deftypefn {Function File} {} dec2hex (@var{n})
-Return the hexadecimal number corresponding to the nonnegative decimal
-number @var{n}, as a string.  For example,
-
-@example
-dec2hex (2748)
-     @result{} "abc"
-@end example
-@end deftypefn
+@DOCSTRING(dec2bin)
 
-@deftypefn {Function File} {} hex2dec (@var{s})
-Return the decimal number corresponding to the hexadecimal number stored
-in the string @var{s}.  For example,
-
-@example
-hex2dec ("12B")
-     @result{} 299
-hex2dec ("12b")
-     @result{} 299
-@end example
-@end deftypefn
-
-@deftypefn {Function File} {} str2num (@var{s})
-Convert the string @var{s} to a number.
-@end deftypefn
+@DOCSTRING(dec2hex)
 
-@deftypefn {Function File} {} toascii (@var{s})
-Return ASCII representation of @var{s} in a matrix.  For example,
+@DOCSTRING(hex2dec)
 
-@example
-@group
-toascii ("ASCII")
-     @result{} [ 65, 83, 67, 73, 73 ]
-@end group
-
-@end example
-@end deftypefn
-
-@deftypefn {Function File} {} tolower (@var{s})
-Return a copy of the string @var{s}, with each upper-case character
-replaced by the corresponding lower-case one; nonalphabetic characters
-are left unchanged.  For example,
+@DOCSTRING(str2num)
 
-@example
-tolower ("MiXeD cAsE 123")
-     @result{} "mixed case 123"
-@end example
-@end deftypefn
-
-@deftypefn {Function File} {} toupper (@var{s})
-Return a copy of the string @var{s}, with each  lower-case character
-replaced by the corresponding upper-case one; nonalphabetic characters
-are left unchanged.  For example,
+@DOCSTRING(toascii)
 
-@example
-@group
-toupper ("MiXeD cAsE 123")
-     @result{} "MIXED CASE 123"
-@end group
-@end example
-@end deftypefn
+@DOCSTRING(tolower)
 
-@deftypefn {Built-in Function} {} undo_string_escapes (@var{s})
-Converts special characters in strings back to their escaped forms.  For
-example, the expression
-
-@example
-bell = "\a";
-@end example
+@DOCSTRING(toupper)
 
-@noindent
-assigns the value of the alert character (control-g, ASCII code 7) to
-the string variable @code{bell}.  If this string is printed, the
-system will ring the terminal bell (if it is possible).  This is
-normally the desired outcome.  However, sometimes it is useful to be
-able to print the original representation of the string, with the
-special characters replaced by their escape sequences.  For example,
-
-@example
-octave:13> undo_string_escapes (bell)
-ans = \a
-@end example
-
-@noindent
-replaces the unprintable alert character with its printable
-representation.
-@end deftypefn
+@DOCSTRING(undo_string_escapes)
 
-@defvr {Built-in Variable} implicit_num_to_str_ok
-If the value of @code{implicit_num_to_str_ok} is nonzero, implicit
-conversions of numbers to their ASCII character equivalents are
-allowed when strings are constructed using a mixture of strings and
-numbers in matrix notation.  Otherwise, an error message is printed and
-control is returned to the top level. The default value is 0.  For
-example,
+@DOCSTRING(implicit_num_to_str_ok)
 
-@example
-@group
-[ "f", 111, 111 ]
-     @result{} "foo"
-@end group
-@end example
-@end defvr
-
-@defvr {Built-in Variable} implicit_str_to_num_ok
-If the value of @code{implicit_str_to_num_ok} is nonzero, implicit
-conversions of strings to their numeric ASCII equivalents are allowed.
-Otherwise, an error message is printed and control is returned to the
-top level.  The default value is 0.
-@end defvr
+@DOCSTRING(implicit_str_to_num_ok)
 
 @node Character Class Functions,  , String Conversions, Strings
 @section Character Class Functions
@@ -432,53 +196,26 @@
 @end group
 @end example
 
-@deftypefn {Mapping Function} {} isalnum (@var{s})
-Return 1 for characters that are letters or digits (@code{isalpha
-(@var{a})} or @code{isdigit (@var{})} is true).
-@end deftypefn
+@DOCSTRING(isalnum)
 
-@deftypefn {Mapping Function} {} isalpha (@var{s})
-Return true for characters that are letters (@code{isupper (@var{a})}
-or @code{islower (@var{})} is true). 
-@end deftypefn
+@DOCSTRING(isalpha)
+
+@DOCSTRING(isascii)
 
-@deftypefn {Mapping Function} {} isascii (@var{s})
-Return 1 for characters that are ASCII (in the range 0 to 127 decimal).
-@end deftypefn
+@DOCSTRING(iscntrl)
 
-@deftypefn {Mapping Function} {} iscntrl (@var{s})
-Return 1 for control characters.
-@end deftypefn
+@DOCSTRING(isdigit)
 
-@deftypefn {Mapping Function} {} isdigit (@var{s})
-Return 1 for characters that are decimal digits.
-@end deftypefn
+@DOCSTRING(isgraph)
 
-@deftypefn {Mapping Function} {} isgraph (@var{s})
-Return 1 for printable characters (but not the space character).
-@end deftypefn
+@DOCSTRING(islower)
 
-@deftypefn {Mapping Function} {} islower (@var{s})
-Return 1 for characters that are lower case letters.
-@end deftypefn
+@DOCSTRING(isprint)
 
-@deftypefn {Mapping Function} {} isprint (@var{s})
-Return 1 for printable characters (including the space character).
-@end deftypefn
+@DOCSTRING(ispunct)
 
-@deftypefn {Mapping Function} {} ispunct (@var{s})
-Return 1 for punctuation characters.
-@end deftypefn
+@DOCSTRING(isspace)
 
-@deftypefn {Mapping Function} {} isspace (@var{s})
-Return 1 for whitespace characters (space, formfeed, newline,
-carriage return, tab, and vertical tab).
-@end deftypefn
+@DOCSTRING(isupper)
 
-@deftypefn {Mapping Function} {} isupper (@var{s})
-Return 1 for upper case letters.
-@end deftypefn
-
-@deftypefn {Mapping Function} {} isxdigit (@var{s})
-Return 1 for characters that are hexadecimal digits.
-@end deftypefn
+@DOCSTRING(isxdigit)
--- a/doc/interpreter/struct.txi	Fri Nov 19 05:15:27 1999 +0000
+++ b/doc/interpreter/struct.txi	Fri Nov 19 21:19:44 1999 +0000
@@ -113,10 +113,7 @@
 This prevents long and confusing output from large deeply nested
 structures.
 
-@defvr {Built-in Variable} struct_levels_to_print
-You can tell Octave how many structure levels to display by setting the
-built-in variable @code{struct_levels_to_print}.  The default value is 2.
-@end defvr
+@DOCSTRING(struct_levels_to_print)
 
 Functions can return structures.  For example, the following function
 separates the real and complex parts of a matrix and stores them in two
@@ -184,18 +181,8 @@
 The following functions are available to give you information about
 structures.
 
-@deftypefn {Built-in Function} {} is_struct (@var{expr})
-Return 1 if the value of the expression @var{expr} is a structure.
-@end deftypefn
+@DOCSTRING(is_struct)
 
-@deftypefn {Built-in Function} {} struct_contains (@var{expr}, @var{name})
-Return 1 if the expression @var{expr} is a structure and it includes an
-element named @var{name}.  The first argument must be a structure and
-the second must be a string.
-@end deftypefn
+@DOCSTRING(struct_contains)
 
-@deftypefn {Built-in Function} {} struct_elements (@var{struct})
-Return a list of strings naming the elements of the structure
-@var{struct}.  It is an error to call @code{struct_elements} with an
-argument that is not a structure.
-@end deftypefn
+@DOCSTRING(struct_elements)
--- a/doc/interpreter/var.txi	Fri Nov 19 05:15:27 1999 +0000
+++ b/doc/interpreter/var.txi	Fri Nov 19 21:19:44 1999 +0000
@@ -138,162 +138,24 @@
 but the value of @code{x} at the top level remains unchanged, because
 the function works with a @emph{copy} of its argument.
 
-@defvr {Built-in Variable} warn_comma_in_global_decl
-If the value of @code{warn_comma_in_global_decl} is nonzero, a
-warning is issued for statements like
-
-@example
-global a = 1, b
-@end example
-
-@noindent
-which makes the variables @code{a} and @code{b} global and assigns the
-value 1 to the variable @code{a}, because in this context, the comma is
-not interpreted as a statement separator.
-
-The default value of @code{warn_comma_in_global_decl} is nonzero.
-@end defvr
-
-@defvr default_global_variable_value
-if @code{initialize_global_variables} is nonzero, the value of
-@code{default_glbaol_variable_value} is used as the initial value of
-global variables that are not explicitly initialized.  for example,
+@DOCSTRING(default_global_variable_value)
 
-@example
-@group
-initialize_global_variables = 1;
-default_global_variable_value = 13;
-global foo;
-foo
-     @result{} 13
-@end group
-@end example
-
-the variable @code{default_global_variable_value} is initially undefined.
-@end defvr
-
-@deftypefn {Built-in Function} {} is_global (@var{name})
-Return 1 if @var{name} is globally visible.  Otherwise, return 0.  For
-example,
-
-@example
-@group
-global x
-is_global ("x")
-     @result{} 1
-@end group
-@end example
-@end deftypefn
+@DOCSTRING(is_global)
 
 @node Status of Variables, Summary of Built-in Variables, Global Variables, Variables
 @section Status of Variables
 
-@deffn {Command} clear options pattern @dots{}
-Delete the names matching the given patterns from the symbol table.  The
-pattern may contain the following special characters:
-@table @code
-@item ?
-Match any single character.
-
-@item *
-Match zero or more characters.
-
-@item [ @var{list} ]
-Match the list of characters specified by @var{list}.  If the first
-character is @code{!} or @code{^}, match all characters except those
-specified by @var{list}.  For example, the pattern @samp{[a-zA-Z]} will
-match all lower and upper case alphabetic characters. 
-@end table
-
-For example, the command
-
-@example
-clear foo b*r
-@end example
+@DOCSTRING(clear)
 
-@noindent
-clears the name @code{foo} and all names that begin with the letter
-@code{b} and end with the letter @code{r}.
+@DOCSTRING(who)
 
-If @code{clear} is called without any arguments, all user-defined
-variables (local and global) are cleared from the symbol table.  If
-@code{clear} is called with at least one argument, only the visible
-names matching the arguments are cleared.  For example, suppose you have
-defined a function @code{foo}, and then hidden it by performing the
-assignment @code{foo = 2}.  Executing the command @kbd{clear foo} once
-will clear the variable definition and restore the definition of
-@code{foo} as a function.  Executing @kbd{clear foo} a second time will
-clear the function definition.
-
-This command may not be used within a function body.
-@end deffn
-
-@deffn {Command} who options pattern @dots{}
-@deffnx {Command} whos options pattern @dots{}
-List currently defined symbols matching the given patterns.  The
-following are valid options.  They may be shortened to one character but
-may not be combined.
-
-@table @code
-@item -all
-List all currently defined symbols.
+@DOCSTRING(exist)
 
-@item -builtins
-List built-in variables and functions.  This includes all currently
-compiled function files, but does not include all function files that
-are in the @code{LOADPATH}.
-
-@item -functions
-List user-defined functions.
-
-@item -long
-Print a long listing including the type and dimensions of any symbols.
-The symbols in the first column of output indicate whether it is
-possible to redefine the symbol, and whether it is possible for it to be
-cleared.
-
-@item -variables
-List user-defined variables.
-@end table
-
-Valid patterns are the same as described for the @code{clear} command
-above.  If no patterns are supplied, all symbols from the given category
-are listed.  By default, only user defined functions and variables
-visible in the local scope are displayed.
-
-The command @kbd{whos} is equivalent to @kbd{who -long}.
-@end deffn
+@DOCSTRING(document)
 
-@deftypefn {Built-in Function} {} exist (@var{name})
-Return 1 if the name exists as a variable, 2 if the name (after
-appending @samp{.m}) is a function file in the path, 3 if the name is a
-@samp{.oct} file in the path, or 5 if the name is a built-in function.
-Otherwise, return 0.
-@end deftypefn
-
-@deftypefn {Built-in Function} {} document (@var{symbol}, @var{text})
-Set the documentation string for @var{symbol} to @var{text}.
-@end deftypefn
-
-@deffn {Command} type options name @dots{}
-Display the definition of each @var{name} that refers to a function.
+@DOCSTRING(type)
 
-Normally also displays if each @var{name} is user-defined or builtin;
-the @code{-q} option suppresses this behaviour.
-
-Currently, Octave can only display functions that can be compiled
-cleanly, because it uses its internal representation of the function to
-recreate the program text.
-
-Comments are not displayed because Octave's parser currently discards
-them as it converts the text of a function file to its internal
-representation.  This problem may be fixed in a future release.
-@end deffn
-
-@deffn {Command} which name @dots{}
-Display the type of each @var{name}.  If @var{name} is defined from a
-function file, the full name of the file is also displayed.
-@end deffn
+@DOCSTRING(which)
 
 @node Summary of Built-in Variables, Defaults from the Environment, Status of Variables, Variables
 @section Summary of Built-in Variables
--- a/scripts/ChangeLog	Fri Nov 19 05:15:27 1999 +0000
+++ b/scripts/ChangeLog	Fri Nov 19 21:19:44 1999 +0000
@@ -1,7 +1,160 @@
+1999-11-19  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* strings/blanks.m: Texinfoize doc string.
+	* strings/strcat.m: Ditto.
+	* strings/str2mat.m: Ditto.
+	* strings/deblank.m: Ditto.
+	* strings/findstr.m: Ditto.
+	* strings/index.m: Ditto.
+	* strings/rindex.m: Ditto.
+	* strings/split.m: Ditto.
+	* strings/strcmp.m: Ditto.
+	* strings/strrep.m: Ditto.
+	* strings/substr.m: Ditto.
+	* general/int2str.m: Ditto.
+	* general/num2str.m: Ditto.
+	* strings/dec2bin.m: Ditto.
+	* strings/bin2dec: Ditto.
+	* strings/dec2bin: Ditto.
+	* strings/dec2hex: Ditto.
+	* strings/hex2dec: Ditto.
+	* strings/str2num: Ditto.
+
 1999-11-10  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* Makefile.in (DISTFILES): Include DOCSTRINGS.
 
+1999-11-09  Ben Sapp <bsapp@nua.lampf.lanl.gov>
+
+	* control/DEMOcontrol.m: Texinfoize doc string.
+	* control/abcddim.m: Ditto.
+	* control/abcddims.m: Ditto.
+	* control/analdemo.m: Ditto.
+	* control/are.m: Ditto.
+	* control/axis2dlim.m: Ditto.
+	* control/bddemo.m: Ditto.
+	* control/bode.m: Ditto.
+	* control/bode_bounds.m: Ditto.
+	* control/bodquist.m: Ditto.
+	* control/buildssic.m: Ditto.
+	* control/c2d.m: Ditto.
+	* control/ctrb.m: Ditto.
+	* control/d2c.m: Ditto.
+	* control/damp.m: Ditto.
+	* control/dare.m: Ditto.
+	* control/dcgain.m: Ditto.
+	* control/dgkfdemo.m: Ditto.
+	* control/dgram.m: Ditto.
+	* control/dlqe.m: Ditto.
+	* control/dlqr.m: Ditto.
+	* control/dlyap.m: Ditto.
+	* control/dmr2d.m: Ditto.
+	* control/fir2sys.m: Ditto.
+	* control/frdemo.m: Ditto.
+	* control/freqchkw.m: Ditto.
+	* control/freqresp.m: Ditto.
+	* control/gram.m: Ditto.
+	* control/h2norm.m: Ditto.
+	* control/h2syn.m: Ditto.
+	* control/hinf_ctr.m: Ditto.
+	* control/hinfdemo.m: Ditto.
+	* control/hinfnorm.m: Ditto.
+	* control/hinfsyn.m: Ditto.
+	* control/hinfsyn_chk.m: Ditto.
+	* control/impulse.m: Ditto.
+	* control/is_abcd.m: Ditto.
+	* control/is_controllable.m: Ditto.
+	* control/is_detectable.m: Ditto.
+	* control/is_dgkf.m: Ditto.
+	* control/is_digital.m: Ditto.
+	* control/is_observable.m: Ditto.
+	* control/is_sample.m: Ditto.
+	* control/is_signal_list.m: Ditto.
+	* control/is_siso.m: Ditto.
+	* control/is_stabilizable.m: Ditto.
+	* control/is_stable.m: Ditto.
+	* control/jet707.m: Ditto.
+	* control/lqe.m: Ditto.
+	* control/lqg.m: Ditto.
+	* control/lqr.m: Ditto.
+	* control/lsim.m: Ditto.
+	* control/ltifr.m: Ditto.
+	* control/lyap.m: Ditto.
+	* control/moddemo.m: Ditto.
+	* control/nyquist.m: Ditto.
+	* control/obsv.m: Ditto.
+	* control/ord2.m: Ditto.
+	* control/outlist.m: Ditto.
+	* control/pinv.m: Ditto.
+	* control/place.m: Ditto.
+	* control/polyout.m: Ditto.
+	* control/prompt.m: Ditto.
+	* control/pzmap.m: Ditto.
+	* control/qzval.m: Ditto.
+	* control/rldemo.m: Ditto.
+	* control/rlocus.m: Ditto.
+	* control/sortcom.m: Ditto.
+	* control/ss2sys.m: Ditto.
+	* control/ss2tf.m: Ditto.
+	* control/ss2zp.m: Ditto.
+	* control/starp.m: Ditto.
+	* control/step.m: Ditto.
+	* control/stepimp.m: Ditto.
+	* control/susball.m: Ditto.
+	* control/sys2fir.m: Ditto.
+	* control/sys2ss.m: Ditto.
+	* control/sys2tf.m: Ditto.
+	* control/sys2zp.m: Ditto.
+	* control/sysadd.m: Ditto.
+	* control/sysappend.m: Ditto.
+	* control/syschnames.m: Ditto.
+	* control/syschnamesl.m: Ditto.
+	* control/syschtsam.m: Ditto.
+	* control/sysconnect.m: Ditto.
+	* control/syscont.m: Ditto.
+	* control/syscont_disc.m: Ditto.
+	* control/sysdefioname.m: Ditto.
+	* control/sysdefstname.m: Ditto.
+	* control/sysdimensions.m: Ditto.
+	* control/sysdisc.m: Ditto.
+	* control/sysdup.m: Ditto.
+	* control/sysgetsignals.m: Ditto.
+	* control/sysgettype.m: Ditto.
+	* control/sysgroup.m: Ditto.
+	* control/sysgroupn.m: Ditto.
+	* control/sysmult.m: Ditto.
+	* control/sysout.m: Ditto.
+	* control/sysprune.m: Ditto.
+	* control/sysreorder.m: Ditto.
+	* control/sysrepdemo.m: Ditto.
+	* control/sysscale.m: Ditto.
+	* control/syssetsignals.m: Ditto.
+	* control/syssub.m: Ditto.
+	* control/sysupdate.m: Ditto.
+	* control/tf2ss.m: Ditto.
+	* control/tf2sys.m: Ditto.
+	* control/tf2sysl.m: Ditto.
+	* control/tf2zp.m: Ditto.
+	* control/tfout.m: Ditto.
+	* control/tzero.m: Ditto.
+	* control/tzero2.m: Ditto.
+	* control/ugain.m: Ditto.
+	* control/wgt1o.m: Ditto.
+	* control/zgfmul.m: Ditto.
+	* control/zgfslv.m: Ditto.
+	* control/zginit.m: Ditto.
+	* control/zgpbal.m: Ditto.
+	* control/zgreduce.m: Ditto.
+	* control/zgrownorm.m: Ditto.
+	* control/zgscal.m: Ditto.
+	* control/zgsgiv.m: Ditto.
+	* control/zgshsr.m: Ditto.
+	* control/zp2ss.m: Ditto.
+	* control/zp2ssg2.m: Ditto.
+	* control/zp2sys.m: Ditto.
+	* control/zp2tf.m: Ditto.
+	* control/zpout.m: Ditto.
+
 1999-11-02  Ben Sapp <bsapp@nua.lampf.lanl.gov>
 
 	* scripts/audio/lin2mu.m: Texinfoize doc string.
--- a/scripts/general/int2str.m	Fri Nov 19 05:15:27 1999 +0000
+++ b/scripts/general/int2str.m	Fri Nov 19 21:19:44 1999 +0000
@@ -17,10 +17,14 @@
 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 
-## usage: int2str (x)
-##
-## Round x to the nearest integer and format as a string.
-##
+## -*- texinfo -*-
+## @deftypefn {Function File} {} int2str (@var{n})
+## @deftypefnx {Function File} {} num2str (@var{x})
+## Convert a number to a string.  These functions are not very flexible,
+## but are provided for compatibility with @sc{Matlab}.  For better control
+## over the results, use @code{sprintf} (@pxref{Formatted Output}).
+## @end deftypefn
+
 ## See also: sprintf, num2str
 
 ## Author: jwe
--- a/scripts/general/num2str.m	Fri Nov 19 05:15:27 1999 +0000
+++ b/scripts/general/num2str.m	Fri Nov 19 21:19:44 1999 +0000
@@ -17,10 +17,14 @@
 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 
-## usage: num2str (x)
-##
-## Format x as a string.
-##
+## -*- texinfo -*-
+## @deftypefn {Function File} {} int2str (@var{n})
+## @deftypefnx {Function File} {} num2str (@var{x})
+## Convert a number to a string.  These functions are not very flexible,
+## but are provided for compatibility with @sc{Matlab}.  For better control
+## over the results, use @code{sprintf} (@pxref{Formatted Output}).
+## @end deftypefn
+
 ## See also: sprintf, int2str
 
 ## Author: jwe
--- a/scripts/strings/blanks.m	Fri Nov 19 05:15:27 1999 +0000
+++ b/scripts/strings/blanks.m	Fri Nov 19 21:19:44 1999 +0000
@@ -17,9 +17,10 @@
 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 
-## usage:  blanks (n)
-##
-## Returns a string of n blanks.
+## -*- texinfo -*-
+## @deftypefn {Function File} {} blanks (@var{n})
+## Return a string of @var{n} blanks.
+## @end deftypefn
 
 ## Author: Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>
 ## Adapted-By: jwe
--- a/scripts/strings/deblank.m	Fri Nov 19 05:15:27 1999 +0000
+++ b/scripts/strings/deblank.m	Fri Nov 19 21:19:44 1999 +0000
@@ -17,9 +17,10 @@
 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 
-## usage:  deblank (s)
-##
-## Remove trailing blanks from the string s.
+## -*- texinfo -*-
+## @deftypefn {Function File} {} deblank (@var{s})
+## Removes the trailing blanks from the string @var{s}. 
+## @end deftypefn
 
 ## Author: Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>
 ## Adapted-By: jwe
--- a/scripts/strings/dec2bin.m	Fri Nov 19 05:15:27 1999 +0000
+++ b/scripts/strings/dec2bin.m	Fri Nov 19 21:19:44 1999 +0000
@@ -17,10 +17,16 @@
 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 
-## usage:  dec2bin (x)
-##
-## Returns the binary number corresponding to the nonnegative integer
-## x.  For example, dec2bin (14) returns "1110".
+## -*- texinfo -*-
+## @deftypefn {Function File} {} dec2bin (@var{n})
+## Return a binary number corresponding the nonnegative decimal number
+## @var{n}, as a string of ones and zeros.  For example,
+## 
+## @example
+## dec2bin (14)
+##      @result{} "1110"
+## @end example
+## @end deftypefn
 
 ## Author: Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>
 ## Adapted-By: jwe
--- a/scripts/strings/dec2hex.m	Fri Nov 19 05:15:27 1999 +0000
+++ b/scripts/strings/dec2hex.m	Fri Nov 19 21:19:44 1999 +0000
@@ -17,10 +17,16 @@
 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 
-## usage:  dec2hex (d)
-##
-## Returns the hex number corresponding to the decimal number d.  For
-## example, dec2hex (2748) returns "abc".
+## -*- texinfo -*-
+## @deftypefn {Function File} {} dec2hex (@var{n})
+## Return the hexadecimal number corresponding to the nonnegative decimal
+## number @var{n}, as a string.  For example,
+## 
+## @example
+## dec2hex (2748)
+##      @result{} "abc"
+## @end example
+## @end deftypefn
 
 ## Author: Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>
 ## Adapted-By: jwe
--- a/scripts/strings/findstr.m	Fri Nov 19 05:15:27 1999 +0000
+++ b/scripts/strings/findstr.m	Fri Nov 19 21:19:44 1999 +0000
@@ -17,18 +17,20 @@
 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 
-## usage: findstr (s, t [, overlap])
-##
-## Returns the vector of all positions in the longer of the two strings
-## S and T where an occurence of the shorter of the two starts.
-##
-## If the optional argument OVERLAP is nonzero, the returned vector
-## can include overlapping positions (this is the default).
-##
-## For example,
-##
-##   findstr ("abababa", "aba")     =>  [1, 3, 5]
-##   findstr ("abababa", "aba", 0)  =>  [1, 5]
+## -*- texinfo -*-
+## @deftypefn {Function File} {} findstr (@var{s}, @var{t}, @var{overlap})
+## Return the vector of all positions in the longer of the two strings
+## @var{s} and @var{t} where an occurrence of the shorter of the two starts.
+## If the optional argument @var{overlap} is nonzero, the returned vector
+## can include overlapping positions (this is the default).  For example,
+## 
+## @example
+## findstr ("ababab", "a")
+##      @result{} [ 1, 3, 5 ]
+## findstr ("abababa", "aba", 0)
+##      @result{} [ 1, 5 ]
+## @end example
+## @end deftypefn
 
 ## Author: Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>
 ## Adapted-By: jwe
--- a/scripts/strings/hex2dec.m	Fri Nov 19 05:15:27 1999 +0000
+++ b/scripts/strings/hex2dec.m	Fri Nov 19 21:19:44 1999 +0000
@@ -17,11 +17,18 @@
 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 
-## usage:  hex2dec (h)
-##
-## Returns the decimal number corresponding to the hex number in
-## quotes.  For example, hex2dec ("12B") and hex2dec ("12b") both
-## return 299.
+## -*- texinfo -*-
+## @deftypefn {Function File} {} hex2dec (@var{s})
+## Return the decimal number corresponding to the hexadecimal number stored
+## in the string @var{s}.  For example,
+## 
+## @example
+## hex2dec ("12B")
+##      @result{} 299
+## hex2dec ("12b")
+##      @result{} 299
+## @end example
+## @end deftypefn
 
 ## Author: Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>
 ## Adapted-By: jwe
--- a/scripts/strings/index.m	Fri Nov 19 05:15:27 1999 +0000
+++ b/scripts/strings/index.m	Fri Nov 19 21:19:44 1999 +0000
@@ -17,12 +17,18 @@
 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 
-## usage:  index (s, t)
-##
-## Returns the position of the first occurence of the string T in the
-## string S or 0 if no occurence is found.
-##
-## NOTE: this function does not work for arrays of strings.
+## -*- texinfo -*-
+## @deftypefn {Function File} {} index (@var{s}, @var{t})
+## Return the position of the first occurrence of the string @var{t} in the
+## string @var{s}, or 0 if no occurrence is found.  For example,
+## 
+## @example
+## index ("Teststring", "t")
+##      @result{} 4
+## @end example
+## 
+## @strong{Note:}  This function does not work for arrays of strings.
+## @end deftypefn
 
 ## Author: Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>
 ## Adapted-By: jwe
--- a/scripts/strings/rindex.m	Fri Nov 19 05:15:27 1999 +0000
+++ b/scripts/strings/rindex.m	Fri Nov 19 21:19:44 1999 +0000
@@ -17,12 +17,18 @@
 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 
-## usage: rindex (s, t)
-##
-## Returns the position of the last occurence of the string T in the
-## string S or 0 if no occurence is found.
-##
-## NOTE: this function does not work for arrays of strings.
+## -*- texinfo -*-
+## @deftypefn {Function File} {} rindex (@var{s}, @var{t})
+## Return the position of the last occurrence of the string @var{t} in the
+## string @var{s}, or 0 if no occurrence is found.  For example,
+## 
+## @example
+## rindex ("Teststring", "t")
+##      @result{} 6
+## @end example
+## 
+## @strong{Note:}  This function does not work for arrays of strings.
+## @end deftypefn
 
 ## Author: Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>
 ## Adapted-By: jwe
--- a/scripts/strings/split.m	Fri Nov 19 05:15:27 1999 +0000
+++ b/scripts/strings/split.m	Fri Nov 19 21:19:44 1999 +0000
@@ -17,11 +17,19 @@
 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 
-## usage:  m = split (s, t)
-##
-## Divides the string S into pieces separated by T, and stores the
-## pieces as the rows of M (padded with blanks to form a valid
-## matrix).
+## -*- texinfo -*-
+## @deftypefn {Function File} {} split (@var{s}, @var{t})
+## Divides the string @var{s} into pieces separated by @var{t}, returning
+## the result in a string array (padded with blanks to form a valid
+## matrix).  For example,
+## 
+## @example
+## split ("Test string", "t")
+##      @result{} "Tes "
+##         " s  "
+##         "ring"
+## @end example
+## @end deftypefn
 
 ## Author: Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>
 ## Adapted-By: jwe
--- a/scripts/strings/str2mat.m	Fri Nov 19 05:15:27 1999 +0000
+++ b/scripts/strings/str2mat.m	Fri Nov 19 21:19:44 1999 +0000
@@ -17,10 +17,17 @@
 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 
-## usage:  m = str2mat (s1, ...)
-##
-## Forms the matrix M containing the strings S1, ... as its rows.
-## Each string is padded with blanks in order to form a valid matrix.
+## -*- texinfo -*-
+## @deftypefn {Function File} {} str2mat (@var{s_1}, @dots{}, @var{s_n})
+## Return a matrix containing the strings @var{s_1}, @dots{}, @var{s_n} as
+## its rows.  Each string is padded with blanks in order to form a valid
+## matrix.
+## 
+## @strong{Note:}
+## This function is modelled after @sc{Matlab}.  In Octave, you can create
+## a matrix of strings by @code{[@var{s_1}; @dots{}; @var{s_n}]} even if
+## the strings are not all the same length.
+## @end deftypefn
 
 ## Author: Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>
 ## Adapted-By: jwe
--- a/scripts/strings/str2num.m	Fri Nov 19 05:15:27 1999 +0000
+++ b/scripts/strings/str2num.m	Fri Nov 19 21:19:44 1999 +0000
@@ -17,9 +17,10 @@
 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 
-## usage:  m = str2num (s)
-##
-## Convert the string S to a number.
+## -*- texinfo -*-
+## @deftypefn {Function File} {} str2num (@var{s})
+## Convert the string @var{s} to a number.
+## @end deftypefn
 
 ## Author: jwe
 
--- a/scripts/strings/strcat.m	Fri Nov 19 05:15:27 1999 +0000
+++ b/scripts/strings/strcat.m	Fri Nov 19 21:19:44 1999 +0000
@@ -17,9 +17,19 @@
 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 
-## usage: strcat (s, t, ...)
-##
-## Concatenate strings.
+## -*- texinfo -*-
+## @deftypefn {Function File} {} strcat (@var{s1}, @var{s2}, @dots{})
+## Return a string containing all the arguments concatenated.  For example,
+## 
+## @example
+## @group
+## s = [ "ab"; "cde" ];
+## strcat (s, s, s)
+##      @result{} "ab ab ab "
+##         "cdecdecde"
+## @end group
+## @end example
+## @end deftypefn
 
 ## Author: jwe
 
--- a/scripts/strings/strcmp.m	Fri Nov 19 05:15:27 1999 +0000
+++ b/scripts/strings/strcmp.m	Fri Nov 19 21:19:44 1999 +0000
@@ -17,17 +17,14 @@
 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 
-## usage: strcmp (s1, s2)
-##
-## Compare two strings.  Trailing blanks are significant.
-##
-## WARNING:  Unlike the C function of the same name, this function
-## returns 1 for equal and zero for not equal.  Why?  To be compatible
-## with Matlab, of course.
-##
-## Why doesn't this always return a scalar instead of vector with
-## elements corresponding to the rows of the string array?  To be
-## compatible with Matlab, of course.
+## -*- texinfo -*-
+## @deftypefn {Function File} {} strcmp (@var{s1}, @var{s2})
+## Compares two strings, returning 1 if they are the same, and 0 otherwise.
+## 
+## @strong{Note:}  For compatibility with @sc{Matlab}, Octave's strcmp
+## function returns 1 if the strings are equal, and 0 otherwise.  This is
+## just the opposite of the corresponding C library function.
+## @end deftypefn
 
 ## Author: jwe
 
--- a/scripts/strings/strrep.m	Fri Nov 19 05:15:27 1999 +0000
+++ b/scripts/strings/strrep.m	Fri Nov 19 21:19:44 1999 +0000
@@ -17,10 +17,16 @@
 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 
-## usage:  strrep (s, x, y)
-##
-## Replace all occurences of the substring x of the string s with the
-## string y.
+## -*- texinfo -*-
+## @deftypefn {Function File} {} strrep (@var{s}, @var{x}, @var{y})
+## Replaces all occurrences of the substring @var{x} of the string @var{s}
+## with the string @var{y}.  For example,
+## 
+## @example
+## strrep ("This is a test string", "is", "&%$")
+##      @result{} "Th&%$ &%$ a test string"
+## @end example
+## @end deftypefn
 
 ## Author: Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>
 ## Created: 11 November 1994
--- a/scripts/strings/substr.m	Fri Nov 19 05:15:27 1999 +0000
+++ b/scripts/strings/substr.m	Fri Nov 19 21:19:44 1999 +0000
@@ -17,12 +17,28 @@
 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 
-## usage:  substr (s, offset, len)
-##
-## Returns the substring of S of length LEN starting at index OFFSET.
+## -*- texinfo -*-
+## @deftypefn {Function File} {} substr (@var{s}, @var{beg}, @var{len})
+## Return the substring of @var{s} which starts at character number
+## @var{beg} and is @var{len} characters long.
+## 
 ## If OFFSET is negative, extraction starts that far from the end of
 ## the string.  If LEN is omitted, the substring extends to the end
 ## of S.
+## 
+##   For example,
+## 
+## @example
+## substr ("This is a test string", 6, 9)
+##      @result{} "is a test"
+## @end example
+## 
+## @quotation
+## @strong{Note:}
+## This function is patterned after AWK.  You can get the same result by
+## @code{@var{s} (@var{beg} : (@var{beg} + @var{len} - 1))}.  
+## @end quotation
+## @end deftypefn
 
 ## Author: Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>
 ## Adapted-By: jwe
--- a/src/ChangeLog	Fri Nov 19 05:15:27 1999 +0000
+++ b/src/ChangeLog	Fri Nov 19 21:19:44 1999 +0000
@@ -1,3 +1,18 @@
+1999-11-19  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* pt-decl.cc (Vdefault_global_variable_value): Texinofize doc string.
+	* variables.cc (Fclear, Fdocument, Fexist, Fis_global, Fwho): Ditto.
+	* help.cc (Ftype, Fwhich): Ditto.
+	* ov.cc (Vstruct_levels_to_print, Vimplicit_str_to_num_ok): Ditto.
+	* data.cc (Fis_struct, Fstruct_elements, Fstruct_constains): Ditto.
+	* strfns.cc (Fisstr, Fsetstr): Ditto.
+	* pt-mat.cc: (Fimplicit_num_to_str_ok, Fstring_fill_char): Ditto.
+	* utils.cc (Fundo_string_escapes): Ditto.
+	* mappers.cc: (Fisalnum, Fisalpha, Fisascii, Fiscntrl, Fisdigit,
+	Fisgraph, Fislower, Fisprint, Fispunct, Fisspace, Fisupper,
+	Fisxdigit, Ftoascii, Ftolower, Ftoupper): Ditto.
+	
+
 1999-11-18  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* syscalls.cc (symbols_of_syscalls): Use DEFCONSTX to define
@@ -159,12 +174,12 @@
 
 1999-11-02  Ben Sapp <bsapp@nua.lampf.lanl.gov>
 
-	* src/help.cc (Fhelp): Texinfoize doc string.
-	* src/input.cc (Fecho, Fcompletion_matches): Ditto.
-	* src/oct-hist.cc (Fedit_history, Fhistory, Frun_history): Ditto.
-	* src/pager.cc (Fdiary): Ditto.
-	* src/sysdep.cc (Fclc): Ditto.
-	* src/toplev.cc (Fquit, Fatexit): Ditto.
+	* help.cc (Fhelp): Texinfoize doc string.
+	* input.cc (Fecho, Fcompletion_matches): Ditto.
+	* oct-hist.cc (Fedit_history, Fhistory, Frun_history): Ditto.
+	* pager.cc (Fdiary): Ditto.
+	* sysdep.cc (Fclc): Ditto.
+	* toplev.cc (Fquit, Fatexit): Ditto.
 	
 1999-11-02  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
@@ -303,11 +318,12 @@
 
 1999-10-23  Ben Sapp <bsapp@nua.lampf.lanl.gov>
 
-	* data.cc (Fis_matrix): Texinfoize doc string.  * ov.cc
-	(Vpropagate_empty_matrices): Ditto.  * pr-output.cc
-	(Vfixed_point_format, Voutput_max_field_width, Voutput_precision,
-	Vprint_empty_dimensions, Vsplit_long_rows): Ditto.  * pt-mat.cc:cd
-	(Vempty_list_elements_ok): Ditto.
+	* data.cc (Fis_matrix): Texinfoize doc string.
+	* ov.cc	(Vpropagate_empty_matrices): Ditto.
+	* pt-mat.cc: (Vempty_list_elements_ok): Ditto.
+	* pr-output.cc (Vfixed_point_format, Voutput_max_field_width,
+	Voutput_precision, Vprint_empty_dimensions, Vsplit_long_rows):
+	Ditto.
 
 1999-10-22  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
--- a/src/data.cc	Fri Nov 19 05:15:27 1999 +0000
+++ b/src/data.cc	Fri Nov 19 21:19:44 1999 +0000
@@ -814,7 +814,10 @@
 }
 
 DEFUN (is_struct, args, ,
-  "is_struct (x): return nonzero if x is a structure")
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} is_struct (@var{expr})\n\
+Return 1 if the value of the expression @var{expr} is a structure.\n\
+@end deftypefn")
 {
   octave_value retval;
 
@@ -827,9 +830,12 @@
 }
 
 DEFUN (struct_elements, args, ,
-  "struct_elements (S)\n\
-\n\
-Return a list of the names of the elements of the structure S.")
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} struct_elements (@var{struct})\n\
+Return a list of strings naming the elements of the structure\n\
+@var{struct}.  It is an error to call @code{struct_elements} with an\n\
+argument that is not a structure.\n\
+@end deftypefn")
 {
   octave_value_list retval;
 
@@ -852,10 +858,12 @@
 }
 
 DEFUN (struct_contains, args, ,
-  "struct_contains (S, NAME)\n\
-\n\
-Return nonzero if S is a structure with element NAME.\n\
-S must be a structure and NAME must be a string.")
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} struct_contains (@var{expr}, @var{name})\n\
+Return 1 if the expression @var{expr} is a structure and it includes an\n\
+element named @var{name}.  The first argument must be a structure and\n\
+the second must be a string.\n\
+@end deftypefn")
 {
   octave_value_list retval;
 
--- a/src/help.cc	Fri Nov 19 05:15:27 1999 +0000
+++ b/src/help.cc	Fri Nov 19 21:19:44 1999 +0000
@@ -829,9 +829,22 @@
 }
 
 DEFUN_TEXT (type, args, nargout,
-  "type NAME\n\
+  "-*- texinfo -*-\n\
+\n\
+@deffn {Command} type options name @dots{}\n\
+Display the definition of each @var{name} that refers to a function.\n\
+\n\
+Normally also displays if each @var{name} is user-defined or builtin;\n\
+the @code{-q} option suppresses this behaviour.\n\
 \n\
-display the definition of each NAME that refers to a function")
+Currently, Octave can only display functions that can be compiled\n\
+cleanly, because it uses its internal representation of the function to\n\
+recreate the program text.\n\
+\n\
+Comments are not displayed because Octave's parser currently discards\n\
+them as it converts the text of a function file to its internal\n\
+representation.  This problem may be fixed in a future release.\n\
+@end deffn")
 {
   octave_value_list retval;
 
@@ -944,10 +957,11 @@
 }
 
 DEFUN_TEXT (which, args, nargout,
-  "which NAME ...\n\
-\n\
-display the type of each NAME.  If NAME is defined from an function\n\
-file, print the full name of the file.")
+  "-*- texinfo -*-\n\
+@deffn {Command} which name @dots{}\n\
+Display the type of each @var{name}.  If @var{name} is defined from a\n\
+function file, the full name of the file is also displayed.\n\
+@end deffn")
 {
   octave_value_list retval;
 
--- a/src/mappers.cc	Fri Nov 19 05:15:27 1999 +0000
+++ b/src/mappers.cc	Fri Nov 19 21:19:44 1999 +0000
@@ -353,46 +353,85 @@
 See also: real, conj");
 
   DEFUN_MAPPER (isalnum, xisalnum, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
-    "isalnum (X): ");
+    "-*- texinfo -*-\n\
+@deftypefn {Mapping Function} {} isalnum (@var{s})\n\
+Return 1 for characters that are letters or digits (@code{isalpha\n\
+(@var{a})} or @code{isdigit (@var{a})} is true).\n\
+@end deftypefn");
 
   DEFUN_MAPPER (isalpha, xisalpha, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
-    "isalpha (X): ");
+    "-*- texinfo -*-\n\
+@deftypefn {Mapping Function} {} isalpha (@var{s})\n\
+Return true for characters that are letters (@code{isupper (@var{a})}\n\
+or @code{islower (@var{})} is true).\n\
+@end deftypefn");
 
   DEFUN_MAPPER (isascii, xisascii, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
-    "isascii (X): ");
+    "-*- texinfo -*-\n\
+@deftypefn {Mapping Function} {} isascii (@var{s})\n\
+Return 1 for characters that are ASCII (in the range 0 to 127 decimal).\n\
+@end deftypefn");
 
   DEFUN_MAPPER (iscntrl, xiscntrl, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
-    "iscntrl (X): ");
+    "-*- texinfo -*-\n\
+@deftypefn {Mapping Function} {} iscntrl (@var{s})\n\
+Return 1 for control characters.\n\
+@end deftypefn");
 
   DEFUN_MAPPER (isdigit, xisdigit, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
-    "isdigit (X): ");
+    "-*- texinfo -*-\n\
+@deftypefn {Mapping Function} {} isdigit (@var{s})\n\
+Return 1 for characters that are decimal digits.\n\
+@end deftypefn");
 
   DEFUN_MAPPER (isinf, 0, xisinf, xisinf, 0, 0, 0, 0.0, 0.0, 0,
     "isinf (X): return 1 for elements of X infinite");
 
   DEFUN_MAPPER (isgraph, xisgraph, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
-    "isgraph (X): ");
+    "-*- texinfo -*-\n\
+@deftypefn {Mapping Function} {} isgraph (@var{s})\n\
+Return 1 for printable characters (but not the space character).\n\
+@end deftypefn");
 
   DEFUN_MAPPER (islower, xislower, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
-    "islower (X): ");
+    "-*- texinfo -*-\n\
+@deftypefn {Mapping Function} {} islower (@var{s})\n\
+Return 1 for characters that are lower case letters.\n\
+@end deftypefn");
 
   DEFUN_MAPPER (isnan, 0, xisnan, xisnan, 0, 0, 0, 0.0, 0.0, 0,
     "isnan (X): return 1 where elements of X are NaNs");
 
   DEFUN_MAPPER (isprint, xisprint, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
-    "isprint (X): ");
+    "-*- texinfo -*-\n\
+@deftypefn {Mapping Function} {} isprint (@var{s})\n\
+Return 1 for printable characters (including the space character).\n\
+@end deftypefn");
 
   DEFUN_MAPPER (ispunct, xispunct, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
-    "ispunct (X): ");
+    "-*- texinfo -*-\n\
+@deftypefn {Mapping Function} {} ispunct (@var{s})\n\
+Return 1 for punctuation characters.\n\
+@end deftypefn");
 
   DEFUN_MAPPER (isspace, xisspace, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
-    "isspace (X): ");
+    "-*- texinfo -*-\n\
+@deftypefn {Mapping Function} {} isspace (@var{s})\n\
+Return 1 for whitespace characters (space, formfeed, newline,\n\
+carriage return, tab, and vertical tab).\n\
+@end deftypefn");
 
   DEFUN_MAPPER (isupper, xisupper, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
-    "isupper (X): ");
+    "-*- texinfo -*-\n\
+@deftypefn {Mapping Function} {} isupper (@var{s})\n\
+Return 1 for upper case letters.\n\
+@end deftypefn");
 
   DEFUN_MAPPER (isxdigit, xisxdigit, 0, 0, 0, 0, 0, 0.0, 0.0, 0,
-    "isxdigit (X): ");
+    "-*- texinfo -*-\n\
+@deftypefn {Mapping Function} {} isxdigit (@var{s})\n\
+Return 1 for characters that are hexadecimal digits.\n\
+@end deftypefn");
 
   DEFUN_MAPPER (lgamma, 0, 0, 0, xlgamma, 0, 0, 0.0, 0.0, 0,
     "-*- texinfo -*-\n\
@@ -493,13 +532,46 @@
 @end deftypefn");
 
   DEFUN_MAPPER (toascii, xtoascii, 0, 0, 0, 0, 0, 0.0, 0.0, 1,
-    "toascii (STRING): return ASCII representation of STRING in a matrix");
+    "-*- texinfo -*-\n\
+@deftypefn {Mapping Function} {} toascii (@var{s})\n\
+Return ASCII representation of @var{s} in a matrix.  For example,\n\
+\n\
+@example\n\
+@group\n\
+toascii (\"ASCII\")\n\
+     @result{} [ 65, 83, 67, 73, 73 ]\n\
+@end group\n\
+\n\
+@end example\n\
+@end deftypefn")
 
   DEFUN_MAPPER (tolower, xtolower, 0, 0, 0, 0, 0, 0.0, 0.0, 2,
-    "tolower (STRING): convert upper case characters to lower case in STRING");
+    "-*- texinfo -*-\n\
+@deftypefn {Mapping Function} {} tolower (@var{s})\n\
+Return a copy of the string @var{s}, with each upper-case character\n\
+replaced by the corresponding lower-case one; nonalphabetic characters\n\
+are left unchanged.  For example,\n\
+\n\
+@example\n\
+tolower (\"MiXeD cAsE 123\")\n\
+     @result{} \"mixed case 123\"\n\
+@end example\n\
+@end deftypefn")
 
   DEFUN_MAPPER (toupper, xtoupper, 0, 0, 0, 0, 0, 0.0, 0.0, 2,
-    "toupper (STRING): convert lower case characters to upper case in STRING");
+    "-*- texinfo -*-\n\
+@deftypefn {Function File} {} toupper (@var{s})\n\
+Return a copy of the string @var{s}, with each  lower-case character\n\
+replaced by the corresponding upper-case one; nonalphabetic characters\n\
+are left unchanged.  For example,\n\
+\n\
+@example\n\
+@group\n\
+toupper (\"MiXeD cAsE 123\")
+     @result{} \"MIXED CASE 123\"\n\
+@end group\n\
+@end example\n\
+@end deftypefn")
 
   DEFALIAS (gammaln, lgamma);
 
--- a/src/ov.cc	Fri Nov 19 05:15:27 1999 +0000
+++ b/src/ov.cc	Fri Nov 19 21:19:44 1999 +0000
@@ -1521,7 +1521,13 @@
     "allow single indices for matrices");
 
   DEFVAR (implicit_str_to_num_ok, 0.0, implicit_str_to_num_ok,
-    "allow implicit string to number conversion");
+    "-*- texinfo -*-\n\
+@defvr {Built-in Variable} implicit_str_to_num_ok\n\
+If the value of @code{implicit_str_to_num_ok} is nonzero, implicit\n\
+conversions of strings to their numeric ASCII equivalents are allowed.\n\
+Otherwise, an error message is printed and control is returned to the\n\
+top level.  The default value is 0.\n\
+@end defvr")
 
   DEFVAR (ok_to_lose_imaginary_part, "warn", ok_to_lose_imaginary_part,
     "silently convert from complex to real by dropping imaginary part");
@@ -1544,7 +1550,11 @@
     "enlarge matrices on assignment");
 
   DEFVAR (struct_levels_to_print, 2.0, struct_levels_to_print,
-    "number of levels of structure elements to print");
+    "-*- texinfo -*-\n\
+@defvr {Built-in Variable} struct_levels_to_print\n\
+You can tell Octave how many structure levels to display by setting the\n\
+built-in variable @code{struct_levels_to_print}.  The default value is 2.\n\
+@end defvr")
 
   DEFVAR (warn_divide_by_zero, 1.0, warn_divide_by_zero,
     "if TRUE, warn about division by zero");
--- a/src/pt-decl.cc	Fri Nov 19 05:15:27 1999 +0000
+++ b/src/pt-decl.cc	Fri Nov 19 21:19:44 1999 +0000
@@ -189,8 +189,26 @@
 symbols_of_pt_decl (void)
 {
   DEFVAR (default_global_variable_value, , 0,
-    "the default for value for otherwise uninitialized global variables.\n\
-Only used if the variable initialize_global_variables is nonzero.");
+    "-*- texinfo -*-\n\
+@defvr default_global_variable_value\n\
+The default for value for otherwise uninitialized global variables.\n\
+Only used if the variable initialize_global_variables is nonzero.\n\
+If @code{initialize_global_variables} is nonzero, the value of\n\
+@code{default_glbaol_variable_value} is used as the initial value of\n\
+global variables that are not explicitly initialized.  for example,\n\
+\n\
+@example\n\
+@group\n\
+initialize_global_variables = 1;\n\
+default_global_variable_value = 13;\n\
+global foo;\n\
+foo\n\
+     @result{} 13\n\
+@end group\n\
+@end example\n\
+\n\
+the variable @code{default_global_variable_value} is initially undefined.\n\
+@end defvr");
 
   DEFVAR (initialize_global_variables, 0.0, initialize_global_variables,
     "control whether otherwise uninitialized global variables are\n\
--- a/src/pt-mat.cc	Fri Nov 19 05:15:27 1999 +0000
+++ b/src/pt-mat.cc	Fri Nov 19 21:19:44 1999 +0000
@@ -629,10 +629,41 @@
 @end defvr");
 
   DEFVAR (implicit_num_to_str_ok, 0.0, implicit_num_to_str_ok,
-    "make the result of things like `[97, 98, 99, \"123\"]' be a string");
+    "-*- texinfo -*-\n\
+@defvr {Built-in Variable} implicit_num_to_str_ok\n\
+If the value of @code{implicit_num_to_str_ok} is nonzero, implicit\n\
+conversions of numbers to their ASCII character equivalents are\n\
+allowed when strings are constructed using a mixture of strings and\n\
+numbers in matrix notation.  Otherwise, an error message is printed and\n\
+control is returned to the top level. The default value is 0.  For\n\
+example,\n\
+\n\
+@example\n\
+@group\n\
+[ \"f\", 111, 111 ]\n\
+     @result{} \"foo\"\n\
+@end group\n\ 
+@end example\n\
+@end defvr")
 
   DEFVAR (string_fill_char, " ", string_fill_char,
-    "the character to fill with when creating string arrays.");
+    "-*- texinfo -*-\n\
+@defvr {Built-in Variable} string_fill_char\n\
+The value of this variable is used to pad all strings in a string matrix\n\
+to the same length.  It should be a single character.  The default value\n\
+is @code{\" \"} (a single space).  For example,\n\
+\n\
+@example\n\
+@group\n\
+string_fill_char = \"X\";\n\
+[ \"these\"; \"are\"; \"strings\" ]\n\
+     @result{} \"theseXX\"\n\
+        \"areXXXX\"\n\
+        \"strings\"\n\
+@end group\n\
+@end example\n\
+@end defvr")
+
 }
 
 /*
--- a/src/strfns.cc	Fri Nov 19 05:15:27 1999 +0000
+++ b/src/strfns.cc	Fri Nov 19 21:19:44 1999 +0000
@@ -36,7 +36,10 @@
 #include "utils.h"
 
 DEFUN (isstr, args, ,
-  "isstr (X): return 1 if X is a string, 0 otherwise")
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} isstr (@var{a})\n\
+Return 1 if @var{a} is a string.  Otherwise, return 0.\n\
+@end deftypefn")
 {
   octave_value_list retval;
 
@@ -51,7 +54,19 @@
 }
 
 DEFUN (setstr, args, ,
-  "setstr (V): convert a vector to a string")
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} setstr (@var{x})\n\
+Convert a matrix to a string.  Each element of the matrix is converted\n\
+to the corresponding ASCII \n\
+character.  For example,\n\
+\n\
+@example\n\
+@group\n\
+setstr ([97, 98, 99])\n\
+     @result{} "abc"\n\
+@end group\n\
+@end example\n\
+@end deftypefn")
 {
   octave_value_list retval;
 
--- a/src/utils.cc	Fri Nov 19 05:15:27 1999 +0000
+++ b/src/utils.cc	Fri Nov 19 21:19:44 1999 +0000
@@ -513,7 +513,32 @@
 }
 
 DEFUN (undo_string_escapes, args, ,
-  "undo_string_escapes (STRING)")
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} undo_string_escapes (@var{s})\n\
+Converts special characters in strings back to their escaped forms.  For\n\
+example, the expression\n\
+\n\
+@example\n\
+bell = \"\\a\";\n\
+@end example\n\
+\n\
+@noindent\n\
+assigns the value of the alert character (control-g, ASCII code 7) to\n\
+the string variable @code{bell}.  If this string is printed, the\n\
+system will ring the terminal bell (if it is possible).  This is\n\
+normally the desired outcome.  However, sometimes it is useful to be\n\
+able to print the original representation of the string, with the\n\
+special characters replaced by their escape sequences.  For example,\n\
+\n\
+@example\n\
+octave:13> undo_string_escapes (bell)\n\
+ans = \\a\n\
+@end example\n\
+\n\
+@noindent\n\
+replaces the unprintable alert character with its printable\n\
+representation.\n\
+@end deftypefn")
 {
   octave_value retval;
 
--- a/src/variables.cc	Fri Nov 19 05:15:27 1999 +0000
+++ b/src/variables.cc	Fri Nov 19 21:19:44 1999 +0000
@@ -367,8 +367,19 @@
 }
 
 DEFUN (is_global, args, ,
-  "is_global (X): return 1 if the string X names a global variable\n\
-otherwise, return 0.")
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} is_global (@var{name})\n\
+Return 1 if @var{name} is globally visible.  Otherwise, return 0.  For\n\
+example,\n\
+\n\
+@example\n\
+@group\n\
+global x\n\
+is_global (\"x\")\n\
+     @result{} 1\n\
+@end group\n\
+@end example\n\
+@end deftypefn")
 {
   octave_value_list retval = 0.0;
 
@@ -396,20 +407,18 @@
 }
 
 DEFUN (exist, args, ,
-  "exist (NAME): check if variable or file exists\n\
-\n\
-returns:\n\
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} exist (@var{name})\n\
+Return 1 if the name exists as a variable, 2 if the name (after\n\
+appending @samp{.m}) is a function file in the path, 3 if the name is a\n\
+@samp{.oct} file in the path, or 5 if the name is a built-in function.\n\
+Otherwise, return 0.\n\
 \n\
-   0 : NAME is undefined\n\
-   1 : NAME is a variable\n\
-   2 : NAME is a function\n\
-   3 : NAME is a .oct file in the current LOADPATH\n\
-   5 : NAME is a built-in function\n\
-\n\
-This function also returns 2 if a regular file called NAME exists in\n\
-Octave's LOADPATH.  If you want information about other types of\n\
-files, you should use some combination of the functions file_in_path\n\
-and stat instead.")
+This function also returns 2 if a regular file called @var{name}\n\
+exists in Octave's @code{LOADPATH}.  If you want information about\n\
+other types of files, you should use some combination of the functions\n\
+@code{file_in_path} and @code{stat} instead.\n\
+@end deftypefn")
 {
   octave_value_list retval;
 
@@ -757,9 +766,10 @@
 }
 
 DEFUN (document, args, ,
-  "document (NAME, STRING)\n\
-\n\
-Associate a cryptic message with a variable name.")
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} document (@var{symbol}, @var{text})\n\
+Set the documentation string for @var{symbol} to @var{text}.\n\
+@end deftypefn")
 {
   octave_value retval;
 
@@ -901,10 +911,42 @@
 }
 
 DEFUN_TEXT (who, args, ,
-  "who [-all] [-builtins] [-functions] [-long] [-variables]\n\
+  "-*- texinfo -*-\n\
+@deffn {Command} who options pattern @dots{}\n\
+@deffnx {Command} whos options pattern @dots{}\n\
+List currently defined symbols matching the given patterns.  The\n\
+following are valid options.  They may be shortened to one character but\n\
+may not be combined.\n\
+\n\
+@table @code\n\
+@item -all\n\
+List all currently defined symbols.\n\
+\n\
+@item -builtins\n\
+List built-in variables and functions.  This includes all currently\n\
+compiled function files, but does not include all function files that\n\
+are in the @code{LOADPATH}.\n\
 \n\
-List currently defined symbol(s).  Options may be shortened to one\n\
-character, but may not be combined.")
+@item -functions\n\
+List user-defined functions.\n\
+\n\
+@item -long\n\
+Print a long listing including the type and dimensions of any symbols.\n\
+The symbols in the first column of output indicate whether it is\n\
+possible to redefine the symbol, and whether it is possible for it to be\n\
+cleared.\n\
+\n\
+@item -variables\n\
+List user-defined variables.\n\
+@end table\n\
+\n\
+Valid patterns are the same as described for the @code{clear} command\n\
+above.  If no patterns are supplied, all symbols from the given category\n\
+are listed.  By default, only user defined functions and variables\n\
+visible in the local scope are displayed.\n\
+\n\
+The command @kbd{whos} is equivalent to @kbd{who -long}.\n\
+@end deffn")
 {
   octave_value_list retval;
 
@@ -1031,14 +1073,48 @@
 // Deleting names from the symbol tables.
 
 DEFUN_TEXT (clear, args, ,
-  "clear [-x] [name ...]\n\
+  "-*- texinfo -*-\n\
+@deffn {Command} clear [-x] pattern @dots{}\n\
+Delete the names matching the given patterns from the symbol table.  The\n\
+pattern may contain the following special characters:\n\
+@table @code\n\
+@item ?\n\
+Match any single character.\n\
 \n\
-Clear symbol(s) matching a list of globbing patterns.\n\
+@item *\n\
+Match zero or more characters.\n\
+\n\
+@item [ @var{list} ]\n\
+Match the list of characters specified by @var{list}.  If the first\n\
+character is @code{!} or @code{^}, match all characters except those\n\
+specified by @var{list}.  For example, the pattern @samp{[a-zA-Z]} will\n\
+match all lower and upper case alphabetic characters.\n\
+@end table\n\
+\n\
+For example, the command\n\
 \n\
-If no arguments are given, clear all user-defined variables and\n\
-functions.\n\
+@example\n\
+clear foo b*r\n\
+@end example\n\
+\n\
+@noindent\n\
+clears the name @code{foo} and all names that begin with the letter\n\
+@code{b} and end with the letter @code{r}.\n\
 \n\
-With -x, exclude the named variables")
+If @code{clear} is called without any arguments, all user-defined\n\
+variables (local and global) are cleared from the symbol table.  If\n\
+@code{clear} is called with at least one argument, only the visible\n\
+names matching the arguments are cleared.  For example, suppose you have\n\
+defined a function @code{foo}, and then hidden it by performing the\n\
+assignment @code{foo = 2}.  Executing the command @kbd{clear foo} once\n\
+will clear the variable definition and restore the definition of\n\
+@code{foo} as a function.  Executing @kbd{clear foo} a second time will\n\
+clear the function definition.\n\
+\n\
+With -x, clear the variables that don't match the patterns.\n\
+\n\
+This command may not be used within a function body.\n\
+@end deffn")
 {
   octave_value_list retval;