# CLEAR

Updated: 10/14/2021, 2:20:00 PM
Created: 10/14/2021, 2:20:00 PM
Last Updated By: mikes
Read Time: 1 minute(s)

# Description

The CLEAR statement will initialize all the variables to numeric 0. This can be used at any time in the execution of a program. It takes the general form:

CLEAR
1

As can be noted below:

Var1 = 99
Var2 = 50
CLEAR
1
2
3

The above code will clear the variables to zero.

This does not affect COM{MON}, unless the clear_will_clear_common emulation option is set.
With this emulation option in place, only normal un-named COMMON will be cleared. It will not clear named common.

See also CLEARCOMMON

# Note

clear_will_clear_common is set by default in "d3" emulation.

Go back to jBASE BASIC

Go back to Programmers' Reference Guide