Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_TALLY locality
Message
De
05/09/2019 23:37:20
 
 
À
05/09/2019 18:05:09
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01670635
Message ID:
01670644
Vues:
44
>>>I'm wondering if there isn't a PRIVATE type inheritance that occurs for events, where it doesn't occur for methods, such that on events the global variables are inherited from their current values, and they can be altered and manipulated in the event, but when the event returns the PRIVATE nature asserts itself so the original value before the event returns to each variable, and they are visible as they were before the events.
>
>Don't think so. PRIVATE is really a compiler directive, not actually creating the variable unlike LOCAL or PUBLIC. Easy enough to demonstrate:

As I understand it, PRIVATE creates a shadow of the global variable which exists from that point forward in the call structure, but upon returning from whatever the context is (function, method, event), it goes out of scope and the original value defined PUBLIC is once again visible.

I don't view it as a compiler directive. In Visual FreePro, I had to add contextual variable lookups to support PRIVATE variables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform