CLEAR Statement

Initializes program variables to zero.

Syntax

CLEAR

Operation

The CLEAR statement can be used in an initial main program to set all local variables and all local common variables to zero; when used in a subroutine, only the local variables are set to zero. Note that in neither situation are named common variables set to zero.

Programs should not access a variable until a value has been assigned to it.

Example

X = 5
Y = Y+1
.
.
CLEAR

Reinitializes all variables to zero.