Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I loose public var
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01075853
Message ID:
01075878
Views:
19
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform