JavaScript Editor js editor     Web development 

Main Page

Variables exist only while an application is running or during the Visual FoxPro session in which they are created. To specify the scope of a variable, use the LOCAL, PRIVATE, and PUBLIC keywords.

Accessing Variables

If a variable has the same name as a field, Visual FoxPro always gives precedence to the field name. You can reference the variable using m. or m-> plus the variable name, as in the following examples.

В Copy Code
?  m.cFname      
?  m->cFname      && print value in cFname
?  cFname         && prints contents of field cFname

For more information about these commands, see the appropriate topics in Help.

In object-oriented programming you can create properties of objects to hold values instead of using variables. For more information, see Object-Oriented Programming.

See Also

JavaScript Editor js editor     Web development