octave-maintainers
[Top][All Lists]
Advanced

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

Re: saving function handles


From: Muhali
Subject: Re: saving function handles
Date: Mon, 19 Nov 2012 00:27:52 -0800 (PST)

>> hm ... What is so different between a simple string and a string on a
>> filesystem?
>>
>> M.
> 
> The issue is that the string on your system and the string in the file
> will be parsed separately. Say you have a function
> function x = foobar
>   persistent y
>   x = y;
>   y = y + 1;
> endfunction
> 
> then there would be two instances of y, one loaded from the function
> handle and the other loaded from the file system.

if you load a saved function, then anything else than re-initializing the
persistent variables wouldn't make sense to me.

I still fail to see, however, what difference it would make in this case.
This is not about whether y is persistent, but whether the function string
contains the phrase 'persistent y'. But mea culpa, I'm not a programmer.

M.



--
View this message in context: 
http://octave.1599824.n4.nabble.com/saving-function-handles-tp4646675p4646759.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.


reply via email to

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