Download UBI EasyCoder 201 IIE Programming instructions

Transcript
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
20
30
40
50
60
70
80
90
100
110
120
RUN
A$ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
B$ = "abcdefghijklmnopqrstuvwxyz"
FOR I%=0 TO 3:FOR J%=0 TO 3:FOR K%=0 TO 20
C$(I%,J%)=C$(I%,J%)+A$
NEXT K%:NEXT J%:NEXT I%
PRINT "String A before:
";A$
PRINT "String B before:
";B$
PRINT "Free memory before: ";FRE(1)
CLEAR
PRINT "String A after:
";A$
PRINT "String B after:
";B$
PRINT "Free memory after: ";FRE(1)
yields:
String A before:
ABCDEFGHIJKLMNOPQRSTUVWXYZ
String B before:
abcdefghijklmnopqrstuvwxyz
Free memory before: 1867368
String A after:
String B after:
Free memory after: 1876200
Ok
Intermec Fingerprint v7.61 – Programmer’s Reference Manual Ed. 7
39