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

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

[Octave-bug-tracker] [bug #56187] Support local functions at end of scri


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #56187] Support local functions at end of scripts like Matlab
Date: Tue, 23 Apr 2019 09:02:02 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

Follow-up Comment #10, bug #56187 (project octave):

I suppose it is possible, but I don't see why they would be considered nested
unless they were actually defined inside another function (not just the
script).

If we discourage the expectation that a script will define globally visible
functions, then any future transition will be easier.

Many uses of script files that contain functions could be handled perfectly
well with Matlab-style local functions that are not globally visible. 
Converting Octave scripts to work that way would be fairly easy.

If people really want to be able to define globally visible functions in a
script file, then maybe we could provide some way to mark them as such (an
export function or command?).


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56187>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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