Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A basic thought about LOCAL variables
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00309158
Message ID:
00309683
Views:
30
>>>I have to defend myself... :) Although I understand what you're saying (this message and others) and I also agree up to a certain point. :)
>>
>>*snip*
>>
>>FWIW, Paul, I agree with you. They ARE different! :)
>
>Fred,
>
>Ok, one of you tell me exactly how they are different. That is, how is a private variable created through assignment different from a private variable that was declared before it was created through assignment. The variables are NOT any different, the behavior of the program may be different but the variables are PRIVATE. In VFP the default scoping for a variable is PRIVATE.
>
>Please explain to me the different behavior, scoping, visibility or anything else between the two. There is no difference. If a private variable exists and lower level routine refers to that variable then that variable is affected. That is what PRIVATE is. If a routine asssigns a value to a name that does not exist as a variable, then the variable created is PRIVATE.

It's not a matter of anything in the behavior of PRIVATE variables declared either way; it's What is the scope of a variable created by VFP if no variable is presently in-scope that would resolve that name? We're asking what does VFP do if you reference something that can't be resolved by the current name table entries. There is no difference between a PRIVATE that is created explicitly or one that is created implicitly because no other valid variable that is presently in-scope has that name in use.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform