UBI EasyCoder 201 IIE Manuale delle Istruzioni Pagina 228

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 332
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 227
Intermec Fingerprint v7.61 Programmers Reference Manual Ed. 7226
Chapter 2 Program Instructions
RSET
Field of Application
Statement for placing data right-justi ed into a eld in a random
le buffer.
Syntax RSET<svar>=<sexp>
<svar> is the string variable assigned to the eld by a FIELD
statement.
<sexp> holds the input data.
Remarks
After having OPENed a le and formatted it using a FIELD statement,
you can enter data into the random le buffer using the RSET and LSET
statements (LSET left-justi es the data).
The input data can only be stored in the buffer as string expressions. Therefore,
a numeric expression must be converted to string by the use of a STR$
function before an LSET or RSET statement is executed.
If the length of the input data is less than the eld, the data will be
right justi ed and the remaining number of bytes will be printed as
space characters.
If the length of the input data exceeds the length of the eld, the input data
will be truncated on the left side.
Example
10 OPEN "PHONELIST" AS #8 LEN=26
20 FIELD#8,8 AS F1$, 8 AS F2$, 10 AS F3$
30 SNAME$="SMITH"
40 CNAME$="JOHN"
50 PHONE$="12345630"
60 LSET F1$=SNAME$
70 LSET F2$=CNAME$
80 RSET F3$=PHONE$
90 PUT #8,1
100 CLOSE#8
RUN
SAVE "PROGRAM 1.PRG "
NEW
10 OPEN "PHONELIST" AS #8 LEN=26
20 FIELD#8,8 AS F1$, 8 AS F2$, 10 AS F3$
30 GET #8,1
40 PRINT F1$,F2$,F3$
RUN
yields:
SMITH
↔↔↔
JOHN
↔↔↔↔↔↔
12345630
Vedere la pagina 227
1 2 ... 223 224 225 226 227 228 229 230 231 232 233 ... 331 332

Commenti su questo manuale

Nessun commento