17.08.2013 Views

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CLEAR<br />

Chapter 2 Program Instructions<br />

Field of Application Statement clearing strings, variables and arrays in order to free memory<br />

space.<br />

Syntax CLEAR<br />

Remarks The CLEAR statement empties all strings, sets all variables to zero and resets<br />

all arrays to their default values. As a result, more free memory space<br />

becomes available.<br />

Example In this example, more free memory space is obtained after the strings have<br />

been emptied by means of a CLEAR statement:<br />

10 A$ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"<br />

20 B$ = "abcdefghijklmnopqrstuvwxyz"<br />

30 FOR I%=0 TO 3:FOR J%=0 TO 3:FOR K%=0 TO 20<br />

40 C$(I%,J%)=C$(I%,J%)+A$<br />

50 NEXT K%:NEXT J%:NEXT I%<br />

60 PRINT "String A before: ";A$<br />

70 PRINT "String B before: ";B$<br />

80 PRINT "Free memory before: ";FRE(1)<br />

90 CLEAR<br />

100 PRINT "String A after: ";A$<br />

110 PRINT "String B after: ";B$<br />

120 PRINT "Free memory after: ";FRE(1)<br />

RUN<br />

yields:<br />

String A before: ABCDEFGHIJKLMNOPQRSTUVWXYZ<br />

String B before: abcdefghijklmnopqrstuvwxyz<br />

Free memory before: 1867368<br />

String A after:<br />

String B after:<br />

Free memory after: 1876200<br />

Ok<br />

<strong>Intermec</strong> Fingerprint 7.2 – Reference Manual Ed. 3 37

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!