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.

RSET<br />

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

Chapter —Program Instructions<br />

Purpose Statement for placing data right-justified into a field in a random file<br />

buffer.<br />

Syntax RSET=<br />

is the string variable assigned to the field by a FIELD statement.<br />

holds the input data.<br />

Remarks After having OPENed a file and formatted it using a FIELD statement,<br />

you can enter data into the random file buffer using the RSET and LSET<br />

statements (LSET left-justifies the data).<br />

The input data can only be stored in the buffer as string expressions. Therefore,<br />

a numeric expression must be converted to string by the use of a<br />

STR$ function before an LSET or RSET statement is executed.<br />

If the length of the input data is less than the field, the data will be right<br />

justified and the remaining number of bytes will be printed as space characters.<br />

If the length of the input data exceeds the length of the field, the input<br />

data will be truncated on the left side.<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:

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

Saved successfully!

Ooh no, something went wrong!