help-octave
[Top][All Lists]
Advanced

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

Re: Old Octave warning


From: Carlo de Falco
Subject: Re: Old Octave warning
Date: Tue, 17 Nov 2015 09:35:49 +0100


Il 17/nov/2015 01:35, "Ariel Arelovich" <address@hidden> ha scritto:
>
> Hello:
>
> I have developed quite a large script intended for a third party using Octave 3.8.2- 
>
> However as this third party needs to run it in RHEL 6, I have to readapt it to work in Octave 3.4.3
>
> Upon doing this I got the following warning:
>
> "nested functions are coerced into subfunctions"
>
> This does not seem to change my script's functionality on the first few tests that I've tried, but I'm worried about it. 
>
> It's referring to the fact that I have defined functions iniside some of my functions. But I don't know what the warning means.
>
> Thank you in advance.

Hi

These pages look quite clear to me about the difference between nested functions, which were not available in 3.4, and subfunctions:

https://www.gnu.org/software/octave/doc/interpreter/Subfunctions.html#Subfunctions

https://www.gnu.org/software/octave/doc/interpreter/Nested-Functions.html

If your code does not really need the different scoping rules of nested functions you can just add an "end function" before any additional function definition to turn them into subfunctions.

c.


reply via email to

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