17.08.2013 Views

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

GET<br />

Chapter 2 Program Instructions<br />

Field of Application Statement for reading a record from a random file to a random buffer.<br />

Syntax GET[#],<br />

# indicates that whatever follows is a number. Optional.<br />

is the number assigned to the file when it was OPENed.<br />

is the number of the record. Must be ≠ 0.<br />

Remarks The GET statement is used to read a certain record in a certain random file<br />

to a buffer, where the record will be assigned to variables according to the<br />

FIELD statement given for the buffer. After the GET statement has been<br />

executed, you can use references to the variables defined by the FIELD<br />

statement, to read the characters in the random buffer.<br />

Numeric expressions, which have been converted to string expressions by<br />

STR$ functions before being put into the buffer, can be converted back to<br />

numeric expressions using VAL functions.<br />

Example 10 OPEN "PHONELIST" AS #8 LEN=26<br />

20 FIELD#8,8 AS F1$, 8 AS F2$, 10 AS F3$<br />

30 SNAME$="SMITH"<br />

40 CNAME$="JOHN"<br />

50 PHONE$="12345630"<br />

60 LSET F1$=SNAME$<br />

70 LSET F2$=CNAME$<br />

80 RSET F3$=PHONE$<br />

90 PUT #8,1<br />

100 CLOSE#8<br />

RUN<br />

SAVE "PROGRAM 1.PRG"<br />

NEW<br />

10 OPEN "PHONELIST" AS #8 LEN=26<br />

20 FIELD#8,8 AS F1$, 8 AS F2$, 10 AS F3$<br />

30 GET #8,1<br />

40 PRINT F1$,F2$,F3$<br />

RUN<br />

SMITH — — — JOHN — — — — — — 12345630<br />

yields:<br />

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

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

Saved successfully!

Ooh no, something went wrong!