Programming instructions

Intermec Fingerprint v7.61 Programmers Reference Manual Ed. 7 39
Chapter 2 Program Instructions
CLEAR
Field of Application
Statement clearing strings, variables, and arrays in order to free
memory space.
Syntax CLEAR
Remarks
The CLEAR statement empties all strings, sets all variables to zero, and
resets all arrays to their default values. As a result, more free memory
space becomes available.
Example
In this example, more free memory space is obtained after the strings have
been emptied by means of a CLEAR statement:
10 A$ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
20 B$ = "abcdefghijklmnopqrstuvwxyz"
30 FOR I%=0 TO 3:FOR J%=0 TO 3:FOR K%=0 TO 20
40 C$(I%,J%)=C$(I%,J%)+A$
50 NEXT K%:NEXT J%:NEXT I%
60 PRINT "String A before: ";A$
70 PRINT "String B before: ";B$
80 PRINT "Free memory before: ";FRE(1)
90 CLEAR
100 PRINT "String A after: ";A$
110 PRINT "String B after: ";B$
120 PRINT "Free memory after: ";FRE(1)
RUN
yields:
String A before: ABCDEFGHIJKLMNOPQRSTUVWXYZ
String B before: abcdefghijklmnopqrstuvwxyz
Free memory before: 1867368
String A after:
String B after:
Free memory after: 1876200
Ok