help-octave
[Top][All Lists]
Advanced

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

Re: function help


From: Ben Abbott
Subject: Re: function help
Date: Thu, 23 Feb 2012 17:06:17 -0500

On Feb 23, 2012, at 3:46 PM, "damian.harty" <address@hidden> wrote:

> martin_helm wrote
>> 
>> Because by design all the additional function definitions in the .m file
>> are local and hidden to the outside world.
>> 
> 
> Well, that's the bit I'm not getting. If they are in the script file I'm
> working in, they don't get much more local than that, do they? I can
> understand why they would be invisible, say, from the command line despite
> being present in a script, but I can't understand why they aren't visible
> when they are /in this file/ and why instead they /have to be in a file with
> their own name/. 
> 
> Nevertheless, that's how it is, and I need separate files for any functions
> that I write or else do that init thing. I'll live. But it ain't about
> "local"...
> 
> Damian

If a function in a *script* is named "addr()" and you call "add()" you're 
calling something other than the function you named addr

Ben


reply via email to

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