|
From: | Oliver Heimlich |
Subject: | [Octave-bug-tracker] [bug #46397] eval: The evaluated code should not affect last result |
Date: | Sat, 07 Nov 2015 12:14:24 +0000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.4.0 |
URL: <http://savannah.gnu.org/bugs/?46397> Summary: eval: The evaluated code should not affect last result Project: GNU Octave Submitted by: oheim Submitted on: Sa 07 Nov 2015 13:14:23 CET Category: Octave Function Severity: 3 - Normal Priority: 5 - Normal Item Group: Matlab Compatibility Status: None Assigned to: None Originator Name: Oliver Heimlich Originator Email: Open/Closed: Open Discussion Lock: Any Release: 4.0.0 Operating System: Any _______________________________________________________ Details: When evaluating code with `eval`, this also affects what will be returned by the function `ans` afterwards. In Matlab this is not the case. The function `evalin` is also affected. 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. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?46397> _______________________________________________ Nachricht gesendet von/durch Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |