Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wishlist???
Message
 
To
04/09/1999 12:00:49
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00260725
Message ID:
00261552
Views:
37
>Forgive me, Jim, but I seem to be missing something here. . .
>
>I cannot really see a difference between a PUBLIC memvar and a STATIC memvar. Can you explain.
>
>regards,
>
>Jim N
Jim,

Sure, a static var is one that is local to the routine that crerates it but it retains its value between calls. For example is routine A creates a static var named Mystatic and on the first call Mystatic is assigned the value 3, the next time Routine A is called, Mystatic will have the value of 3.

A Public var is one that remains in scope even after the routine that creates it terminates. A Public var is visible to the routine that creates it, all those above the creator, and all those below the creator. A Static is visible only to the routine that creates it, but it retains its value between calls.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform