PUBLIC: These are global variables and are visible everywhere. Not recommended for OOP.
PRIVATE: Visible to the routine where declared and all routines that it calls.
LOCAL: Visible only to the routine where declared.
I agree with Cetin. Only using LOCAL is a good idea.
>Hi Everyone:
>
>Does anyone have a good site that gives a basic description of using variables in foxpro (specifically scope). i don't have a good understanding of it and have often had it happen where the variables are not available to other parts of my code. therefore, since i'm not building apps for broad distribution but only for my company, i use public variables. i have heard that this is a big no no (especially when computers weren't as fast as they are now), but i don't run into problems but want to be able to stop it before i do.
>
>i remember also a website that has a video describing scope but can't find it. any suggestions? thanks,
>
>paul
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer