Mercurial > forge
changeset 980:2aac9ad934a9 octave-forge
use inline_return rather than r to reduce chances of a name collision
within the expression.
It would be nice if we could handle, e.g.,
inline('if x<3, 3; else x; end')
but I don't know how.
author | pkienzle |
---|---|
date | Sat, 21 Jun 2003 02:57:29 +0000 |
parents | 19eae75f6367 |
children | 69c8bde06b0e |
files | main/miscellaneous/inline.m |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/main/miscellaneous/inline.m Thu Jun 19 13:07:54 2003 +0000 +++ b/main/miscellaneous/inline.m Sat Jun 21 02:57:29 2003 +0000 @@ -52,8 +52,8 @@ if ! exist (fname), break; end end -fcode = sprintf (["function r = %s (%s)\n",\ - " r = ",str,";\n",\ +fcode = sprintf (["function inline_return = %s (%s)\n",\ + " inline_return = ",str,";\n",\ "endfunction;"],\ fname, argstr); eval (fcode);