august
PUBLIC creates memory variables, (or arrays), that can be used or modified anywhere within your application, or in other words, globally. The first character "g" identifies the variable as being global.
PUBLIC gcAlias && Create public variable
gcAlias = ALIAS() && Assign value
PRIVATE hides memory variables, (or arrays), previously declared, from the current program. You cannot use PRIVATE to declare a variable or array
PRIVATE gcAlias
gcAlias = ALIAS() && Assign value
This would convert the variable to being private. Once the program/event/method/procedure containing "PRIVATE" has executed, gcAlias reverts to being public, but the value will be .F.
IMHO, avoid PUBLIC variables if possible, and instead use form properties.
Assuming you have added a form property called NewProperty to your form, then you could:-
DO FORM mainform NAME oMain LINKED
To access NewProperty from the form:-
THISFORM.NewProperty = [Hello World]
To access NewProperty elsewhere in your application:-
oMain.NewProperty = [Hello World]
Hope this helps
Chris [sig][/sig]