--- ../octave-2.1.71/src/help.cc 2005-05-02 07:17:12.000000000 -0400 +++ src/help.cc 2005-06-15 07:26:50.943140872 -0400 @@ -224,64 +224,123 @@ static help_list keywords[] = { { "all_va_args", - "Pass all unnamed arguments to another function call.", }, + "Pass all unnamed arguments to another function call.\n\ +\n\ +See also: varargin, varargout", }, { "break", - "Exit the innermost enclosing do, while or for loop.", }, + "Exit the innermost enclosing do, while or for loop.\n\ +\n\ +See also: continue, return", }, { "case", "A case statement in an switch. Octave cases are exclusive and do not\n\ fall-through as do C-language cases. A switch statement must have at least\n\ -one case.",}, +one case.\n\ +\n\ +See also: switch",}, { "catch", - "begin the cleanup part of a try-catch block", }, + "Begin the cleanup section of a try-catch block. This part of the block\n\ +is not executed unless some part of the try section of the block fails.\n\ +\n\ +WARNING: If there is a failure of a line in the try section, the results\n\ +of the section up to the point of the error will be executed and then the\n\ +catch section will be executed.\n\ +\n\ +See also: error, try", }, { "continue", - "Jump to the end of the innermost enclosing do, while or for loop.", }, + "Jump to the end of the innermost enclosing do, while or for loop.\n\ +\n\ +See also: break, do, for, return, while", }, { "do", "Begin a do-until loop. This differs from a do-while loop in that the\n\ -body of the loop is executed at least once.",}, +body of the loop is executed at least once.\n\ +Example (the final value of a will be 4):\n\ +\n\ +a = 1\n\ +do\n\ + a = a + 1\n\ +until a > 3\n\ +\n\ +See also: for, while",}, { "else", - "Alternate action for an if block.", }, + "Alternate action for an if block.\n\ +\n\ +See also: if", }, { "elseif", - "Alternate conditional test for an if block.", }, + "Alternate conditional test for an if block.\n\ +\n\ +See also: if", }, { "end", - "Mark the end of any for, if, do, while, or function block.", }, + "Mark the end of any for, if, do, try, while, or function block.", }, { "end_try_catch", - "Mark the end of an try-catch block.", }, + "Mark the end of an try-catch block.\n\ +\n\ +See also: try", }, { "end_unwind_protect", - "Mark the end of an unwind_protect block.", }, + "Mark the end of an unwind_protect block.\n\ +\n\ +See also: unwind_protect", }, { "endfor", - "Mark the end of a for loop.", }, + "Mark the end of a for loop.\n\ +\n\ +See also: for", }, { "endfunction", - "Mark the end of a function.", }, + "Mark the end of a function.\n\ +\n\ +See also: function", }, { "endif", - "Mark the end of an if block.", }, + "Mark the end of an if block.\n\ +\n\ +See also: if", }, { "endswitch", - "Mark the end of a switch block.", }, + "Mark the end of a switch block.\n\ +\n\ +See also: switch", }, { "endwhile", - "Mark the end of a while loop.", }, + "Mark the end of a while loop.\n\ +\n\ +See also: while", }, { "for", - "Begin a for loop.", }, + "Begin a for loop.\n\ +\n\ +This provides a method for looping over all values of an array.\n\ +\n\ +Example:\n\ +for i = 1:5\n\ + i\n\ +endfor\n\ +\n\ +See also: do, while", }, { "function", - "Begin a function body.", }, + "Begin a function body. This keyword allows you to define functions\n\ +in the format\n\ +function [output_arg1, output_arg2] = function(input_arg1, input_arg2)\n\ +where an arbitrary number (zero or more) of input and output arguements\n\ +may be specified and a variable number may be specified by using the\n\ +varargin and varargout keywords.\n\ +\n\ +See also: varargin, varargout", }, { "global", - "Declare variables to have global scope.", }, + "Declare variables to have global scope.\n\ +\n\ +See also: persistent, static", }, { "gplot", "Produce 2-D plots using gnuplot-like command syntax.", }, @@ -290,31 +349,76 @@ "Produce 3-D plots using gnuplot-like command syntax.", }, { "if", - "Begin an if block.", }, + "Begin an if block.\n\ +\n\ +This function allows conditional logic to be performed of the form:\n\ +\n\ +if (boolean operator)\n\ + statements\n\ +elseif (boolean operator)\n\ + statements\n\ +...\n\ +else\n\ + statements\n\ +endif\n\ +\n\ +The boolean operator may be a statement of the form \"a == b\" or any\n\ +statement or function that can be evaluated to a non-zero result.\n\ +\n\ +See also: all, any, switch", }, { "otherwise", - "The default statement in a switch block.", }, + "The default statement in a switch block.\n\ +\n\ +See also: switch", }, { "persistent", - "Declare variables as persistent.", }, + "Declare variables as persistent.\n\ +\n\ +See also: global, static", }, { "replot", "Replot a graphic.", }, { "return", - "Return from a function.", }, + "Return from a function.\n\ +\n\ +This may be used to return from a function before the end of the function\n\ +would otherwise occur.\n\ +\n\ +See also: break", }, { "static", - "Declare variables as persistent.", }, + "Declare variables as persistent within a function.\n\ +\n\ +See also: global, persistent", }, { "switch", - "Begin a switch statement.",}, + "Begin a switch statement.\n\ +\n\ +See also: if",}, { "try", - "Begin a try-catch block.", }, + "Begin a try-catch block.\n\ +\n\ +This block allows you to catch errors and execute alternate code in case\n\ +of an error. If there is no error in the try section, then the catch\n\ +section will not be executed.\n\ +\n\ +Example:\n\ +try\n\ + a = 0;\n\ + error ('Now go to catch');\n\ +catch\n\ + b = 1\n\ +end_try_catch\n\ +\n\ +See also: catch, error", }, { "until", - "End a do-until loop.",}, + "End a do-until loop.\n\ +\n\ +See also: do",}, { "unwind_protect", "Begin an unwind_protect block.", }, @@ -323,13 +427,34 @@ "Begin the cleanup section of an unwind_protect block.", }, { "varargin", - "Pass an arbitrary number of arguments into a function.",}, + "Pass an arbitrary number of arguments into a function. The arguments\n\ +are passed in as a cell array.\n\ +\n\ +Example:\n\ +function [a, varargout] = foo(b, varargin)\n\ +\n\ +See also: nargin, nargout, varargout",}, { "varargout", - "Pass an arbitrary number of arguments out of a function.",}, + "Pass an arbitrary number of arguments out of a function. The arguments\n\ +are passed out as a cell array.\n\ +\n\ +Example:\n\ +function [a, varargout] = foo(b, varargin)\n\ +\n\ +See also: nargin, nargout, varargin",}, { "while", - "Begin a while loop.", }, + "Begin a while loop. This will not execute once if the condition is\n\ +not met in contrast to a do loop.\n\ +\n\ +Example:\n\ +i = 0;\n\ +while (i < 3)\n\ + i = i + 1\n\ +endwhile\n\ +\n\ +See also: do, for", }, { 0, 0, }, };