Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wishlist???
Message
 
À
04/09/1999 12:00:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00260725
Message ID:
00261552
Vues:
38
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform