changeset 6643:6a7fc4105bcc

[project @ 2007-05-21 20:37:43 by jwe]
author jwe
date Mon, 21 May 2007 20:37:43 +0000
parents ffee6a1a10f3
children 004561c38e8f
files doc/ChangeLog doc/interpreter/basics.txi src/ChangeLog src/parse.y
diffstat 4 files changed, 27 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/doc/ChangeLog	Mon May 21 19:58:43 2007 +0000
+++ b/doc/ChangeLog	Mon May 21 20:37:43 2007 +0000
@@ -5,7 +5,9 @@
 
         * interpreter/eval.txi: Partition the chapter into sections.
         Describe evalin and assignin functions using text from Paul
-	Kienzle.
+	Kienzle.  Change "See See" to "See".  Use @ref instead of @xref to
+	avoid "See" to be written with a capital letter in the middle of a
+	sentence.
 
         * interpreter/func.txi: New section describing load path.
         Improve 'inline' and 'command' sections.
--- a/doc/interpreter/basics.txi	Mon May 21 19:58:43 2007 +0000
+++ b/doc/interpreter/basics.txi	Mon May 21 20:37:43 2007 +0000
@@ -148,8 +148,8 @@
 Specify the path to search for function files.  The value of @var{path}
 specified on the command line will override any value of
 @code{OCTAVE_PATH} found in the environment, but not any commands in the
-system or user startup files that set the internal variable @code{LOADPATH}
-through one of the path functions.
+system or user startup files that set the internal load path through one
+of the path functions.
 
 @item --persist
 Go to interactive mode after @code{--eval} or reading from a file
--- a/src/ChangeLog	Mon May 21 19:58:43 2007 +0000
+++ b/src/ChangeLog	Mon May 21 20:37:43 2007 +0000
@@ -1,3 +1,7 @@
+2007-05-21  Søren Hauberg  <hauberg@gmail.com>
+
+        * parse.y (Feval): Add example.
+
 2007-05-21  David Bateman  <dbateman@free.fr>
 
 	* error.cc (rethrow_error): Use NULL name so that "error:" is not
--- a/src/parse.y	Mon May 21 19:58:43 2007 +0000
+++ b/src/parse.y	Mon May 21 20:37:43 2007 +0000
@@ -3963,9 +3963,26 @@
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} eval (@var{try}, @var{catch})\n\
 Parse the string @var{try} and evaluate it as if it were an Octave\n\
-program.  If that fails, evaluate the string @var{catch}.\n\
+program.  If that fails, evaluate the optional string @var{catch}.\n\
 The string @var{try} is evaluated in the current context,\n\
 so any results remain available after @code{eval} returns.\n\
+\n\
+The following example makes the variable @var{a} with the approximate\n\
+value 3.1416 available.\n\
+\n\
+@example\n\
+eval(\"a = acos(-1);\");\n\
+@end example\n\
+\n\
+If an error occurs during the evaluation of @var{try} the @var{catch}\n\
+string is evaluated, as the following example shows.\n\
+\n\
+@example\n\
+eval ('error (\"This is a bad example\");',\n\
+      'printf (\"This error occured:\\n%s\", lasterr ());');\n\
+     @print{} This error occured:\n\
+        error: This is a bad example\n\
+@end example\n\
 @end deftypefn")
 {
   octave_value_list retval;