|
From: | Andrew Janke |
Subject: | [Octave-bug-tracker] [bug #56187] Support local functions at end of scripts like Matlab |
Date: | Sun, 21 Apr 2019 09:10:59 -0400 (EDT) |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36 |
URL: <https://savannah.gnu.org/bugs/?56187> Summary: Support local functions at end of scripts like Matlab Project: GNU Octave Submitted by: apjanke Submitted on: Sun 21 Apr 2019 09:10:57 AM EDT Category: Interpreter Severity: 3 - Normal Priority: 5 - Normal Item Group: Matlab Compatibility Status: None Assigned to: None Originator Name: Originator Email: Open/Closed: Open Discussion Lock: Any Release: dev Operating System: Any _______________________________________________________ Details: Both Matlab and Octave now support the use of local functions inside scripts. But they do it differently: Octave requires that the local functions be defined before their use, whereas Matlab requires that all local functions be defined at the _end_ of the script. So any script that uses local functions will only work on one of the two, depending on how it's written. It would be nice to add support for defining local functions at the end of scripts, for Matlab compatibility, and more flexibility in how users write their source code. References: - https://stackoverflow.com/questions/50404236/error-when-running-simple-script-containing-local-function-in-octave - https://stackoverflow.com/questions/55770635/how-to-write-a-single-octave-script-with-function-definitions-compatible-with-ma _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?56187> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |