[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53359] evalin overwrites ans in the caller wo
From: |
Ceral Paquet |
Subject: |
[Octave-bug-tracker] [bug #53359] evalin overwrites ans in the caller workspace |
Date: |
Fri, 16 Mar 2018 08:37:23 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0 |
URL:
<http://savannah.gnu.org/bugs/?53359>
Summary: evalin overwrites ans in the caller workspace
Project: GNU Octave
Submitted by: octavebugs
Submitted on: Fri 16 Mar 2018 12:37:21 PM UTC
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 4.2.1
Operating System: GNU/Linux
_______________________________________________________
Details:
Consider the following function:
function test_evalin()
x = evalin('caller','sqrt(11);');
Since the result of evalin is assigned within the local scope, it should not
be left as "ans" in the caller's workspace. On the other hand, if it is not
assigned in the local scope, then it should be left in the caller in "ans".
Currently Octave does the latter for both cases.
MATLAB
++
>> ans=1; test_evalin; ans
ans =
1
--
Octave
++
>> ans=1; test_evalin; ans
ans = 3.3166
--
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53359>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #53359] evalin overwrites ans in the caller workspace,
Ceral Paquet <=