help-octave
[Top][All Lists]
Advanced

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

Re: nested functions?


From: Mike Miller
Subject: Re: nested functions?
Date: Tue, 18 Feb 2014 13:21:30 -0500

On Tue, Feb 18, 2014 at 12:50:26 -0500, Vic Norton wrote:
> Octave now supports nested functions with scoping rules that are
> compatible with Matlab.
>
> Why then does
> [...example...]
> produce the error message
>
> octave-cli-3.8.0> test2
> parse error near line 11 of file 
> /Users/vic/Norton/Programming/octave/m/tests/test2.m

I get the same parse error with your example. If I convert it to a
function file named outerfunc.m and call outerfunc from the shell,
then it works as you intended.

  octave:1> outerfunc
  hello world

Does the test2.m example script run as you expect in Matlab?

-- 
mike


reply via email to

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