Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
CLEAR variable[, …]
One or more variables to be cleared. (a or n)
The CLEAR statement initializes one or more variables to blanks or their zero representations.
If variable is alpha, it is cleared to spaces. If variable is numeric, it is cleared to its zero representation. A CLEAR statement can include different data types.
CLEAR also affects object lifetime. Clearing an object is like setting it to ^NULL (and in traditional Synergy reduces the reference count).
By default, the CLEAR statement clears a record to spaces. If you are using integer variables, group them together in one record, which should be aligned. Cast the record as an integer when you clear it:
.align LONG record binary_data var ,i4 intarr ,i4 proc
The integer variables contain zero.
If data types are mixed, use INIT instead of CLEAR.
.ALIGN for information about aligning a record.
In the following example:
record avar ,a1 dvar ,3d1 idvar ,d2.2 proc clear avar, dvar, idvar[ ]
the CLEAR statement is functionally equivalent to
avar = " " ;blank dvar(1) = 0 for i from 1 thru 15
idvar[i] = 0.0