CLEAR
ANSI, NCHAR
The CLEAR instruction resets both the Form Pointer and Length Pointer of a character variable to zero, or sets the value of a numeric variable to zero. The instruction uses the following format:
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
dest
Required. A previously defined Character String Variable, a National Character String Variable, a Numeric Variable, a list of string and/or numeric variables, or a VARLIST of string and/or numeric variables that is processed.
Flags Affected: NONE
Note the following:
Both the Form Pointer and Length Pointer of a character variable are set to zero. The contents remain unchanged.
The value of a numeric variable is set to zero.
The ability to clear numeric variables was added in version 7.8.
Enhanced ARRAY processing is supported for the CLEAR instruction, in that each element in the array would have its Form Pointer and Length Pointer set to zero.
See Also: Example Code, FILL, SET, TEST, Character String Instructions
![]() |