changeset 13035:8abb190e6cc8 stable

doc: Improve strnum() docstring str2num.m: Correctly refer to output X, not N. More emphatically recommend using str2double a replacement. Adjust example to use Octave coding standards for spacing.
author Rik <octave@nomad.inbox5.com>
date Thu, 01 Sep 2011 14:36:31 -0700
parents fa0827db4d5d
children f7af3834405c
files scripts/strings/str2num.m
diffstat 1 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/strings/str2num.m	Thu Sep 01 12:18:09 2011 -0400
+++ b/scripts/strings/str2num.m	Thu Sep 01 14:36:31 2011 -0700
@@ -24,24 +24,24 @@
 ##
 ## @example
 ## @group
-## str2num("3.141596")
-##      @result{} 3.141596
+## str2num ("3.141596")
+##       @result{} 3.141596
 ##
-## str2num(["1, 2, 3"; "4, 5, 6"]);
-##      @result{} ans =
-##         1  2  3
-##         4  5  6
+## str2num (["1, 2, 3"; "4, 5, 6"]);
+##       @result{} ans =
+##          1  2  3
+##          4  5  6
 ## @end group
 ## @end example
 ##
 ## The optional second output, @var{state}, is logically true when the
 ## coversion is successful. If the conversion fails the numeric output,
-## @var{n}, is empty and @var{state} is false.
+## @var{x}, is empty and @var{state} is false.
 ##
 ## @strong{Caution:} As @code{str2num} uses the @code{eval} function
 ## to do the conversion, @code{str2num} will execute any code contained
-## in the string @var{s}.  Use @code{str2double} instead if you want to
-## avoid the use of @code{eval}.
+## in the string @var{s}.  Use @code{str2double} for a safer and faster
+## conversion.
 ## @seealso{str2double, eval}
 ## @end deftypefn