swarm-support
[Top][All Lists]
Advanced

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

Re: Is "static" meaningful in Objective-C methods?


From: M Lang / S Railsback
Subject: Re: Is "static" meaningful in Objective-C methods?
Date: Wed, 01 Nov 2000 15:15:22 -0800

"Marcus G. Daniels" wrote:
> 
> >>>>> "PJ" == Paul E Johnson <address@hidden> writes:
> 
> PJ> Is there any danger in using "static" local variables in methods
> PJ> in Objective-C?

More:

a. You will note in my previous example that we use static variables as
flags that *all* instances of a class share, as in determining which
fish gets to write to the output file first. As Marcus said, the value
of a static variable persists among all instances.

b. Actually the example I posted previously was from the model swarm,
the only instance of its class, so (I think) a static variable would
behave similarly to an instance variable.

c. Since you sometimes do multi-run experiments, Paul: I believe that
Steve Jackson found that the value of a static variable persists even
between model runs started automatically with our experiment swarm. When
the second model run starts up, the static variable still has its value
from the first run. Check with Steve to confirm
(address@hidden).

Steve
-- 
address@hidden
Lang, Railsback & Assoc.
250 California Ave., Arcata CA 95521
707-822-0453; Fax 822-1868

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

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