Macro variables

<< Click to Display Table of Contents >>

Navigation:  Macros > Macro structure and syntax >

Macro variables

The user can define variables in a macro. These may be used as counters or as support variables for the processing of attributes. A variable may contain text, a number, a logical value (Boolean), a switch position or a power direction. The various options and the corresponding permissible values are listed in the following table.

 

Variable type

Possible values

Initial value

Text

'ABC…', 'abc…', '0123…'

empty

Number

1, 2, 3, … , 1.1, 1.2, 1.3, … , 1.2E3, …

0

Boolean

TRUE or FALSE

FALSE

Switch position

OPEN or CLOSED

OPEN

Power direction

SUPPLY or ABSORB

ABSORB

Object

 

NIL

 

A variable may be defined in a macro by means of the command Set, assigning a particular value. If a variable is not defined, its initial value (i.e. its value when first used) is as indicated in the table above.

 

The name of a variable may contain letters, numbers and underscore characters (_).

 

Arrays: defined to store a large amount of calculated values

 

See also:

commands

objects

values

attributes

standard objects

 

Back to Structure and syntax.