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.

LSET<br />

Chapter 2 Program Instructions<br />

Field of Application Statement for placing data left-justified into a field in a random file<br />

buffer.<br />

Syntax LSET=<br />

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

statement.<br />

holds the input data.<br />

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

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

statements (RSET right-justifies the data).<br />

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

Therefore, a numeric expression must be converted to string format by the use<br />

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

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

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

characters.<br />

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

be truncated on the right 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:<br />

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

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

Saved successfully!

Ooh no, something went wrong!