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

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

[Octave-bug-tracker] [bug #47451] Return is not respected with input red


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #47451] Return is not respected with input redirection
Date: Fri, 18 Mar 2016 06:18:49 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0

Update of bug #47451 (project octave):

                  Status:                    None => Wont Fix               

    _______________________________________________________

Follow-up Comment #1:

Thanks for the bug report. I think this is the expected behavior. The return
function returns from a function file or script when invoked as a function or
script, either from within the Octave interpreter or when a script is called
as an argument on the command line.

Commands that are read from standard input are intended to be the same as
entering commands on the interpreter command line, which is not the same as
invoking a named script or calling a function.

Other functions also behave differently on standard input vs a script file,
e.g. argv, keyboard.

If you use the exit or quit functions rather than return you will get
equivalent behavior.

If anything, I would rather see return have no effect except when it's in an
actual function definition, but I think it has to return from a called script
for Matlab compatibility. It's best to just avoid return except inside of a
function body.

Marking won't fix, but leaving open for now in case any one else has a
different opinion.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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