5.8.50. LCLS directive

The LCLS directive declares and initializes a local string variable. Local variables can be declared only within a macro. The initial value of the variable is a null string, "".


The syntax of LCLS is:

LCLS variable-name



is the name of the variable to set. The name mustbe unique within the macro that contains it.


See also MACRO directive. The scope of the variable is limited to a particular instantiation of the macro that contains it.

Using LCLS for a variable that is already defined re-initializes the variable to a null string.

Set the value of the variable with the SETS directive. See SETS directive.

See GBLS directive for information on declaring global logical variables.


		MACRO							; Declare a macro
$label		message		$a					; Macro prototype line
		LCLS		err					; Declare local string
									; variable err.
err		SETS		"error no: "					; Set value of err
$label		; code
		INFO		0, "err":CC::STR:$a					; Use string
Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0041C