Overview of Variables

A variable is a named, temporary location in the computer's memory where data is stored. A variable must have a data type, such as long, float, char, word, short, string, or variant. The data type signifies:

You can create and use variables in the Program, System, and Driver modules, and within a Procedure or Event or a Form.

By default, variables are non-public or local. Non-public or local means that a variable defined in one module is not visible from another module. Hiding variables from another module is generally a good programming practice because code from one module is not able to change the variable values defined in another module.

A variable can be used in several ways when you are writing code. Variables can be used in:

For example: nStatus=3

where the value 3 is assigned to the variable nStatus.

For example: '3*lValue+5'

For example: 'tan(dValue)'

where the function tan calculates the parameter dValue.