From octave-maintainers-request at bevo dot che dot wisc dot edu Tue Feb 1 14:42:18 2000 Subject: writing nested functions From: "John W. Eaton" To: "Ross A. Lippert" Cc: "octave-maintainers at bevo dot che dot wisc dot edu" Date: Tue, 1 Feb 2000 14:42:53 -0600 (CST) On 1-Feb-2000, Ross A. Lippert wrote: | Hi. I'm writing a convex hull function which calls several | subfunctions. I am looking in the .m scripts that comes with | octave and trying to find an example where several functions | are defined in a script, the top definition being the one external | and the other defn's being local only to that script, you know | sorta the way matlab 5 (and maybe matlab 4) does it. Octave doesn't support this feature. I don't know when (if ever) it will. | Do I have to have one file per function? I ask this because this | makes me choose between inlining my functions and decreasing | readability, or creating separate files and then having a bunch | of functions callable by the user that the user has no business | calling. For now, use __some_name__ for `private' functions, but define them in separate files (that's the way other parts of Octave currently work). These functions do not really have private scope, but the Octave manual does say that names beginning and ending with double underscores are not generally for user consumption. jwe