help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strange parse error


From: Peter Gawthrop
Subject: Strange parse error
Date: Mon, 09 Aug 2004 12:37:54 +0100 (BST)

The following code:

function x = foo ()
  eval("arg = 1")
  x = sin(arg);
endfunction

Give a
parse error near line 3 of file foo.m
  syntax error
>>>   x = sin(arg);

presumably because octave thinks that arg is the built-in of that name
rather than a variable.

I am running octave  2.1.57 under debian.

  Any ideas?

  P.

 --------------------------------------------------------------------
| Prof. Peter J Gawthrop           | Tel: +44 141 330 4960/2528      |
| Centre for Systems and Control & | Fax: +44 141 330 4343           |
| Dept. of Mechanical Engineering  | Room: James Watt 653            |
| University of Glasgow            | Email: address@hidden |
| GLASGOW G12 8QQ, Scotland, UK    | URL: www.mech.gla.ac.uk/~peterg |
 --------------------------------------------------------------------



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]