I would suggest that you define every variable as type LOCAL, unless you have specific reasons for using a PRIVATE or PUBLIC variable.
LOCAL variables are only seen by the procedure or method in which they are defined
PRIVATE variables are seen by the procedure or method in which they are defined AS WELL AS any procedures or methods that are called from within that proc/method
PUBLIC variables are available to every procedure and method in the application
>>I have been told that any variable in a program (*.prg file) is
>>private unless declared as public. Is this true? Variables I make
>>are always declared as private and if the above statement is true
>>it would save some work making sure every variable is accounted for
>>and is private. I am working inside someone elses application writing
>>reports and I want to be sure.
>
>A variable inside a program will be seen under this hierarchy.
>
>A variable inside a method or event will only be seen in the actual method or event.
>
>But, if you declare it public, it will be seen in the entire application.
Brien R. Givens
Brampwood Systems