02.10.2012 Views

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Chapter —Program Instructions<br />

GET<br />

Purpose 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 />

108 <strong>Intermec</strong> Fingerprint <strong>v8.70.0</strong>/v10.0.0 Programmer´s <strong>Reference</strong> <strong>Manual</strong>

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

Saved successfully!

Ooh no, something went wrong!