|
From: | Daniel J Sebald |
Subject: | Re: Should "ans" include all side effects? |
Date: | Fri, 13 Jun 2014 15:07:07 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16 |
On 06/13/2014 02:50 PM, Daniel J Sebald wrote:
On 06/13/2014 02:46 PM, Daniel J Sebald wrote:but I'm not certain about: octave-cli:130> a=1; a++ ans = 1Perhaps the result should match the following: octave-cli:139> a=1; a+=1 a = 2 i.e., octave-cli:130> a=1; a++ a = 2 Dan
Actually, if side effect expressions are allowed, perhaps it should be that IF there is a side effect, it also is displayed, e.g.,
octave-cli:140> a=1; sin(a++) ans = 0.84147 a = 2 Dan
[Prev in Thread] | Current Thread | [Next in Thread] |