Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I loose public var
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01075853
Message ID:
01075878
Vues:
17
>Hi all,
>
>I have a weird problem happening only to one of our customer. He got an error #12 (variable ... not found) This variable is public in the program and there is no "REALEASE ALL EXTEND" in the code
>
>Any idea's welcome

You can "lose" a public variable if you pass the public variable to a function or procedure by reference.
* testpublic.prg
PUBLIC z
z = "test"
?"Pass public z by value"
test(z)
?"Pass public z by reference"
test(@z)

? "After function calls, public var z=",z

FUNCTION test
PARAMETERS xx
? "Parameter xx (passed public z)= ",xx," and TYPE() of z variable=",TYPE("z")
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform