Mercurial > hg > octave-terminal
changeset 9037:4cb9f994dcec
Documentation cleanup of var.texi, expr.texi, eval.texi
Spellcheck
Style check (particularly for two spaces after period)
author | Rik <rdrider0-list@yahoo.com> |
---|---|
date | Sun, 22 Mar 2009 08:41:49 -0700 |
parents | 58604c45ca74 |
children | fca0dc2fb042 |
files | doc/interpreter/eval.txi doc/interpreter/expr.txi doc/interpreter/var.txi scripts/general/genvarname.m scripts/help/type.m scripts/miscellaneous/namelengthmax.m scripts/miscellaneous/run.m scripts/miscellaneous/what.m src/variables.cc |
diffstat | 9 files changed, 37 insertions(+), 37 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/eval.txi +++ b/doc/interpreter/eval.txi @@ -38,8 +38,8 @@ @section Calling a Function by its Name The @code{feval} function allows you to call a function from a string -containing its name. This is useful when writing a function that needs to -call user-supplied functions. The @code{feval} function takes the name +containing its name. This is useful when writing a function that needs to +call user-supplied functions. The @code{feval} function takes the name of the function to call as its first argument, and the remaining arguments are given to the function.
--- a/doc/interpreter/expr.txi +++ b/doc/interpreter/expr.txi @@ -127,7 +127,7 @@ size whose elements are all one, and then to scale it to produce the desired result. @xref{Special Utility Matrices}. -It is also possible to create a matrix with different values. The +It is also possible to create a matrix with different values. The following example creates a 10 dimensional row vector @math{a} containing the values @iftex @@ -206,7 +206,7 @@ @cindex arguments in function call The way to use a function is with a @dfn{function call} expression, which consists of the function name followed by a list of -@dfn{arguments} in parentheses. The arguments are expressions which give +@dfn{arguments} in parentheses. The arguments are expressions which give the raw materials for the calculation that the function will do. When there is more than one argument, they are separated by commas. If there are no arguments, you can omit the parentheses, but it is a good idea to @@ -709,7 +709,7 @@ @strong{Warning:} there is one exception to the rule of evaluating @code{all (@var{boolean1}(:))}, which is when @code{boolean1} is the -empty matrix. The truth value of an empty matrix is always @code{false} +empty matrix. The truth value of an empty matrix is always @code{false} so @code{[] && true} evaluates to @code{false} even though @code{all ([])} is @code{true}. @@ -936,7 +936,7 @@ @noindent The number of values on the left side of the expression can, however, -not exceed the number of values on the right side. For example, the +not exceed the number of values on the right side. For example, the following will produce an error. @c Using 'smallexample' to make text fit on page when creating smallbook. @@ -966,7 +966,7 @@ @opindex *= @opindex /= Similar operators also exist for subtraction (@code{-=}), -multiplication (@code{*=}), and division (@code{/=}). An expression +multiplication (@code{*=}), and division (@code{/=}). An expression of the form @example
--- a/doc/interpreter/var.txi +++ b/doc/interpreter/var.txi @@ -55,10 +55,10 @@ @dfn{assignment operators} and @dfn{increment operators}. @xref{Assignment Ops, ,Assignment Expressions}. -There is one built-in variable with a special meaning. The @code{ans} variable +There is one built-in variable with a special meaning. The @code{ans} variable always contains the result of the last computation, where the output wasn't -assigned to any variable. The code @code{a = cos (pi)} will assign the value -1 -to the variable @code{a}, but will not change the value of @code{ans}. However, +assigned to any variable. The code @code{a = cos (pi)} will assign the value -1 +to the variable @code{a}, but will not change the value of @code{ans}. However, the code @code{cos (pi)} will set the value of @code{ans} to -1. Variables in Octave do not have fixed types, so it is possible to first @@ -186,7 +186,7 @@ A variable that has been declared @dfn{persistent} within a function will retain its contents in memory between subsequent calls to the -same function. The difference between persistent variables and global +same function. The difference between persistent variables and global variables is that persistent variables are local in scope to a particular function and are not visible elsewhere. @@ -225,7 +225,7 @@ @end example The behavior of persistent variables is equivalent to the behavior of -static variables in C. The command @code{static} in Octave is also +static variables in C. The command @code{static} in Octave is also recognized and is equivalent to @code{persistent}. Like global variables, a persistent variable may only be initialized once. @@ -265,7 +265,7 @@ The value of a persistent variable is kept in memory until it is explicitly cleared. Assuming that the implementation of @code{count_calls} -is saved on disc, we get the following behaviour. +is saved on disc, we get the following behavior. @example @group @@ -312,7 +312,7 @@ @section Status of Variables When creating simple one-shot programs it can be very convenient to -see which variables are available at the prompt. The function @code{who} +see which variables are available at the prompt. The function @code{who} and its siblings @code{whos} and @code{whos_line_format} will show different information about what is in memory, as the following shows. @@ -331,9 +331,9 @@ @DOCSTRING(whos_line_format) Instead of displaying which variables are in memory, it is possible -to determine if a given variable is available. That way it is possible -to alter the behaviour of a program depending on the existence of a -variable. The following example illustrates this. +to determine if a given variable is available. That way it is possible +to alter the behavior of a program depending on the existence of a +variable. The following example illustrates this. @example if (! exist ("meaning", "var")) @@ -344,7 +344,7 @@ @DOCSTRING(exist) Usually Octave will manage the memory, but sometimes it can be practical -to remove variables from memory manually. This is usually needed when +to remove variables from memory manually. This is usually needed when working with large variables that fill a substantial part of the memory. On a computer that uses the IEEE floating point format, the following program allocates a matrix that requires around 128 MB memory. @@ -355,13 +355,13 @@ @noindent Since having this variable in memory might slow down other computations, -it can be necessary to remove it manually from memory. The @code{clear} +it can be necessary to remove it manually from memory. The @code{clear} function allows this. @DOCSTRING(clear) Information about a function or variable such as its location in the -file system can also be acquired from within Octave. This is usually +file system can also be acquired from within Octave. This is usually only useful during development of programs, and not within a program. @DOCSTRING(type)
--- a/scripts/general/genvarname.m +++ b/scripts/general/genvarname.m @@ -49,8 +49,8 @@ ## @end example ## ## Note that the result is a char array/cell array of strings, not the -## variables themselves. To define a variable, @code{eval()} can be -## used. The following trivial example sets @code{x} to @code{42}. +## variables themselves. To define a variable, @code{eval()} can be +## used. The following trivial example sets @code{x} to @code{42}. ## ## @example ## @group @@ -80,7 +80,7 @@ ## ## Since variable names may only contain letters, digits and underscores, ## genvarname replaces any sequence of disallowed characters with -## an underscore. Also, variables may not begin with a digit; in this +## an underscore. Also, variables may not begin with a digit; in this ## case an underscore is added before the variable name. ## ## Variable names beginning and ending with two underscores "__" are valid but @@ -88,9 +88,9 @@ ## genvarname will not generate such names. ## ## genvarname will also make sure that returned names do not clash with -## keywords such as "for" and "if". A number will be appended if necessary. +## keywords such as "for" and "if". A number will be appended if necessary. ## Note, however, that this does @strong{not} include function names, -## such as "sin". Such names should be included in @var{avoid} if necessary. +## such as "sin". Such names should be included in @var{avoid} if necessary. ## @seealso{isvarname, exist, tmpnam, eval} ## @end deftypefn
--- a/scripts/help/type.m +++ b/scripts/help/type.m @@ -19,11 +19,11 @@ ## Display the definition of each @var{name} that refers to a function. ## ## Normally also displays whether each @var{name} is user-defined or built-in; -## the @code{-q} option suppresses this behaviour. +## the @code{-q} option suppresses this behavior. ## -## If an output argument is requested nothing is displayed. Instead a cell array -## of strings is returned, where each element corresponds to the definition of -## each requested function. +## If an output argument is requested nothing is displayed. Instead, a cell +## array of strings is returned, where each element corresponds to the +## definition of each requested function. ## @end deftypefn function retval = type (varargin)
--- a/scripts/miscellaneous/namelengthmax.m +++ b/scripts/miscellaneous/namelengthmax.m @@ -18,7 +18,7 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} namelengthmax () -## Returns the matlab compatible maximum variable name length. Octave is +## Returns the @sc{Matlab} compatible maximum variable name length. Octave is ## capable of storing strings up to ## @iftex ## @tex @@ -28,9 +28,9 @@ ## @ifnottex ## @code{2 ^ 31 - 1} ## @end ifnottex -## in length. However for matlab compatibility all variable, function +## in length. However for @sc{Matlab} compatibility all variable, function ## and structure field names should be shorter than the length supplied by -## @code{namelengthmax}. In particular variables stored to a matlab file +## @code{namelengthmax}. In particular variables stored to a @sc{Matlab} file ## format will have their names truncated to this length. ## @end deftypefn
--- a/scripts/miscellaneous/run.m +++ b/scripts/miscellaneous/run.m @@ -20,8 +20,8 @@ ## @deftypefn {Function File} {} run (@var{f}) ## @deftypefnx {Command} {} run @var{f} ## Run scripts in the current workspace that are not necessarily on the -## path. If @var{f} is the script to run, including its path, then @code{run} -## change the directory to the directory where @var{f} is found. @code{run} +## path. If @var{f} is the script to run, including its path, then @code{run} +## change the directory to the directory where @var{f} is found. @code{run} ## then executes the script, and returns to the original directory. ## @seealso{system} ## @end deftypefn
--- a/scripts/miscellaneous/what.m +++ b/scripts/miscellaneous/what.m @@ -20,8 +20,8 @@ ## @deftypefn {Command} {} what ## @deftypefnx {Command} {} what @var{dir} ## @deftypefnx {Function File} {w =} what (@var{dir}) -## List the Octave specific files in a directory. If the variable @var{dir} -## is given then check that directory rather than the current directory. If +## List the Octave specific files in a directory. If the variable @var{dir} +## is given then check that directory rather than the current directory. If ## a return argument is requested, the files found are returned in the ## structure @var{w}. ## @seealso{which}
--- a/src/variables.cc +++ b/src/variables.cc @@ -1564,7 +1564,7 @@ List the variables in the global scope rather than the current scope.\n\ @item -regexp\n\ The patterns are considered as regular expressions and will be used\n\ -for matching the variables to display. The same pattern syntax as for\n\ +for matching the variables to display. The same pattern syntax as for\n\ the @code{regexp} function is used.\n\ @item -file\n\ The following argument is treated as a filename, and the variables that\n\