octave-maintainers
[Top][All Lists]
Advanced

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

Re: eval function: Request for Matlab output


From: John W. Eaton
Subject: Re: eval function: Request for Matlab output
Date: Sat, 07 Nov 2015 08:14:25 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.5.0

On 11/07/2015 06:58 AM, Oliver Heimlich wrote:
Matteo,

thanks. I can identify the following differences between Octave and Matlab:

11
x = eval ('12')

`ans` returns 12 in Octave and 11 in Matlab.

13
x = eval ('14;')

`ans` returns 14 in Octave and 13 in Matlab.

15
x = eval ('16');

`ans` returns 16 in Octave and 15 in Matlab.

17
x = eval ('18;');

`ans` returns 18 in Octave and 17 in Matlab.

Summing up, the eval'ed code has no influence on the last returned value
of the current context in Matlab, but has in Octave. I am going to file
a bug report.

I'm a bit confused here. Is that only true if the result of eval is assigned to a variable?

jwe




reply via email to

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