help-octave
[Top][All Lists]
Advanced

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

Re: global variable question


From: Quentin Spencer
Subject: Re: global variable question
Date: Thu, 11 Dec 2003 19:25:04 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114

address@hidden wrote:

What are persistent variables? Where can I learn more about them?

~Tomer
Persistent variables are the equivalent of static variables in C. A variable is declared as persistent with the command "persistent <variable name>" similar to globals. A persistent variable will retain its contents between sucessive calls to the same function. The difference between a persistent variables and global variables is that persistent variables are local in scope to a particular function and are not visible elsewhere.

It appears that there is currently no help in octave for persistent. This should be added. Maybe I'll write a patch when I get a chance.

-Quentin





-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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