eval problem

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

eval problem

doron-4
Hi,
   Sorry for postingn here and not bug-octave, but my bug-octave script
broke when JWE moved...

Anyway, there is an inconsistency between the MATLAB and OCTAVE treatments
of echoing the results of eval:

MATLAB:

>> s='17';
>> eval(s)
ans =
    17
>> eval(s);
ans =
    17
>> a=eval(s);
>> s='17;';
>> a=eval(s)
??? Missing or unknown operator or multiple expressions when one is expected

OCTAVE:

octave:24> s='17';
octave:25> eval(s)
ans = 17
ans = 17
octave:26> eval(s);
ans = 17
octave:27> a=eval(s);
ans = 17
octave:28> s='17;';
octave:29> a=eval(s)
a = 17


Eyal Doron