octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #41202] Spurious output when path() called wit


From: Michael C. Grant
Subject: [Octave-bug-tracker] [bug #41202] Spurious output when path() called with 'echo on'
Date: Fri, 10 Jan 2014 23:08:49 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36

Follow-up Comment #1, bug #41202 (project octave):

Actually, MATLAB's behavior does differ here: it does not echo script commands
when those scripts are called by functions.

For example, consider files func1.m


function y = func1(x)
script2
script2
y = x;


and script2.m:


x = x + 1;


Obviously, if I type "func1(1)" on the command line, I get the result "3" out.
In MATLAB, the output looks like this, with both ECHO ON and ECHO OFF.


>> echo off
>> func1(1)

ans =

     3

>> echo on
>> func1(1)

ans =

     3



In Octave, I get this:


>> echo off
>> func1(1)
ans =  3
>> echo on
>> func1(1)
x = x + 1;
endscript;
x = x + 1;
endscript;
ans =  3




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?41202>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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