Mercurial > hg > octave-lyh
diff src/oct-parse.yy @ 14172:cba1c681f1b7 stable
doc: Update seealso references for eval family of functions.
oct-parse.yy: Update seealso references for eval family of functions.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 08 Jan 2012 15:04:45 -0800 |
parents | 06aa17228706 |
children | 6b28e8a8c777 |
line wrap: on
line diff
--- a/src/oct-parse.yy +++ b/src/oct-parse.yy @@ -4448,7 +4448,8 @@ DEFUN (eval, args, nargout, "-*- texinfo -*-\n\ -@deftypefn {Built-in Function} {} eval (@var{try}, @var{catch})\n\ +@deftypefn {Built-in Function} {} eval (@var{try})\n\ +@deftypefnx {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 optional string @var{catch}.\n\ The string @var{try} is evaluated in the current context,\n\ @@ -4472,6 +4473,11 @@ This is a bad example\n\ @end group\n\ @end example\n\ +\n\ +Consider using try/catch blocks instead if you are only using @code{eval}\n\ +as an error-capturing mechanism rather than for the execution of arbitrary\n\ +code strings.\n\ +@seealso{evalin}\n\ @end deftypefn") { octave_value_list retval; @@ -4554,6 +4560,7 @@ @deftypefn {Built-in Function} {} assignin (@var{context}, @var{varname}, @var{value})\n\ Assign @var{value} to @var{varname} in context @var{context}, which\n\ may be either @code{\"base\"} or @code{\"caller\"}.\n\ +@seealso{evalin}\n\ @end deftypefn") { octave_value_list retval; @@ -4603,10 +4610,12 @@ DEFUN (evalin, args, nargout, "-*- texinfo -*-\n\ -@deftypefn {Built-in Function} {} evalin (@var{context}, @var{try}, @var{catch})\n\ +@deftypefn {Built-in Function} {} evalin (@var{context}, @var{try})\n\ +@deftypefnx {Built-in Function} {} evalin (@var{context}, @var{try}, @var{catch})\n\ Like @code{eval}, except that the expressions are evaluated in the\n\ context @var{context}, which may be either @code{\"caller\"} or\n\ @code{\"base\"}.\n\ +@seealso{eval, assignin}\n\ @end deftypefn") { octave_value_list retval;