59
MID$ (A$,M,N)
This function returns a substring of the string A$ starting from the Mth character with a
length of N characters.
Example
:
10 A$="ABCDEFGH"
20 B$=MID$(A$,2,3)
30 PRINT B$
RUN
BCD
ASC(A$)
The ASC statement will return the ASCII code (in decimal) for the
FIRST
character of the
specified string. Brackets must enclose the string specified. Refer to the appendix for the
ASCII code table. For example the ASCII decimal value of "X" is 88. If A$="XAB", then
ASC (A$)=88.
Example
:
10 X=ASC("ROY")
20 PRINT X
RUN
82
CHR$ (N)
This statement works the opposite way as the ASC statement. The CHR$ statement will
return the string character which corresponds to the given ASCII code. The argument may
be any number from 32 to 255 or any variable expression with an integer value within that
range. Brackets must be put around the argument.
Содержание PreComputer Prestige
Страница 1: ...COURSE BOOK...