UBI EasyCoder 201 IISA Manuale delle Istruzioni Pagina 97

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 181
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 96
96
Intermec Fingerprint 6.13 – Programmer's Guide
9. DATA HANDLING, cont'd.
2. Input Data Conversion,
cont'd.
Continued!
LEN
The LEN function returns the number of characters including space
characters in a string expression.
Example:
PRINT LEN ("INTERMEC TECHNOLOGIES CORP.") Yields:
27
MID$
The MID$ function returns a part of a string expression. You can
specify start position and, optionally, the number of characters to be
returned.
Example:
PRINT MID$ ("INTERMEC PRINTER",10,2) Yields:
PR
RIGHT$
The RIGHT$ function returns a certain number of characters from
the right side of a string expression, i.e. from the end. The comple-
mentary instruction is LEFT$.
Example:
PRINT RIGHT$("INTERMEC PRINTER",7) Yields:
PRINTER
SGN
The SGN function returns the sign (1 = positive, -1 = negative or 0
= zero) of a numeric expression.
Example:
PRINT SGN(5-10) Yields:
-1
SPACE$
The SPACE$ function returns a specified number of space charac-
ters and is e.g. useful for creating tables with monospace characters.
Example:
10 FONT "MS050RMN"
20 X%=100 : Y%=300
30 FOR Q%=1 TO 5
40 INPUT "Commodity: ", A$
50 INPUT "Price $:", B$
60 C$=SPACE$(15-LEN(A$))
70 PRPOS X%,Y%
80 PRTXT A$+C$+"$ "+B$
90 Y%=Y%-40
100 NEXT
110 PRINTFEED
Note:
When entering the price in the example
for SPACE$, make sure to use a period
character (.) to indicate the decimal point.
Vedere la pagina 96
1 2 ... 92 93 94 95 96 97 98 99 100 101 102 ... 180 181

Commenti su questo manuale

Nessun commento