octave-maintainers
[Top][All Lists]
Advanced

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

Re: Cannot "run" a function file in dev branch.


From: Mike Miller
Subject: Re: Cannot "run" a function file in dev branch.
Date: Tue, 8 Aug 2017 10:10:23 -0700
User-agent: NeoMutt/20170609 (1.8.3)

On Tue, Aug 08, 2017 at 09:27:37 -0700, Rik wrote:
> The issue here is a misconception of what source and run do.  They execute
> script files, not invoke functions.  So in the example you gave all that
> Octave did was parse the file and add the function as a command-line
> function exactly as if you had typed the script at the Octave prompt.  From
> what I can tell, this is what Matlab does as well
> (https://www.mathworks.com/help/matlab/ref/run.html).  Just to be sure,
> someone could try your script in Matlab and see.

I don't have Matlab, and I can't find a reference at the moment, but I
think this was an intention change in the 4.2 release, probably for
compatibility.

Take a look at the discussion in https://savannah.gnu.org/bugs/?33411,
in particular comments #2 and #8.

This intentional change was subsequently lost in
https://hg.savannah.gnu.org/hgweb/octave/rev/3bb0a937c071, where the
source_file function no longer looks for functions from what I can tell.

-- 
mike

Attachment: signature.asc
Description: PGP signature


reply via email to

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