referencing subfunctions

Christian Böhme monodhs at gmx.de
Thu Jun 11 18:12:30 CDT 2009


John W. Eaton wrote:

> Is there some previous context for this discussion?

Yes.  The original post had Message-ID: <4A22DCB2.50200 at gmx.de>.

> I seem to get the same result for both working and broken with the
> current sources (and 3.2.0):
                        ^^^^^
It's only 3.0.5 over here.  Something must have changed over
along the way towards 3.2.0.

>   octave:2> broken (1)
>   p = 1.000000, x = 1.000000
>   p = 3.000000, x = 1.000000
>   y = 4.000000
>   ans =  4
> 
> Is this the result you expect?

The output for broken() over here is:

octave:1> broken(1)
error: `f' undefined near line 15 column 10
error: called from `?unknown?'
error: evaluating binary operator `+' near line 3, column 10
error: evaluating assignment expression near line 3, column 3
error: called from `map' in file `/tmp/map.m'
error: evaluating assignment expression near line 17, column 3
error: called from `broken:h' in file `/tmp/broken.m'
error: evaluating assignment expression near line 3, column 3
error: called from `broken' in file `/tmp/broken.m'

> I seem to recall a scoping bug that might have been similar to what
> you are reporting, and fixing it, but saying that it would not be
> fixed in any 3.0.x release ...

That must be it.  I am using the Debian "testing" distribution
which obviously is still far behind.  Have the sources you are
using been "officially" released yet ?


Thanks,
Christian


More information about the Help-octave mailing list