<<

Contents

Search

>>

 

LOCAL

 

 

Instruction

 

 

Syntax:

LOCAL <Variable> [,<Variable>]...

 

<Variable> = <VARIABLE>

 

Meaning:

Defines local variables which are valid only within one macro.

 

Only non-dimensionized auxiliary variables may be specified as <Variable>.

 

LOCAL does not have to be the first instruction in the macro, local variables can be defined anywhere. The definition, however, always applies to the whole macro: If a variable is called in the macro before it has been defined as LOCAL, it is nevertheless local.

 

It is allowed that global and local variables of the same name appear in the same program. The local variables then apply in the macro.

 

Example: There is a local and a global variable H$. In the macro where the variable H$ has been defined locally all instructions and functions in which the variable H$ is used refer to the local variable H$. In the other macros where no local variable H$ has been defined the global variable H$ is accessed.

 

Note:  If e.g. the variable H$ is defined as LOCAL in several macros, then each of these macros has an own local variable H$. Thus the variables H$ of the macros are not identical.

 

Sample:

LOCAL H$,I%,NR

 

See also:

SHARED

DIM