Language Elements
2-4
Functions
DSKF
EOF
ERL
ERR
EXP
FIX
FRE
HEX$
INP
INPUT$
INSTR$
INT
LEFT$
LEN
LOC
LOF
LOG
MID$
MKD$
MKI$
MKS$
OCT$
PEEK
POS
RIGHT$
RND
SGN
SIN
SPACES
SPC
SQR
STR$
STRING$
TAB
TAN
USR
VAL
VARPTR
Table 2-3. BASIC-80 Functions (Cont'd.)
Returns
Number
of
128-byte sectors free on disk
or
drive
(X)
-1 if end-of-file; 0
if
not
(for file
X).
Line
number
of
last error.
Error
code
of
last error.
e
to
the (X)th power.
Integer value
of
(X).
Number
of
bytes in memory
(X)
or
number
of
bytes in string space
(X$)
String equal to hex value
of
(X%)
Reads a byte from port (X)
Inputs (X) characters from file
(Y)
Position
of
(X$)
within
(Y$)
Integer value
of
(X)
Leftmost
(X)
characters
of
(A$)
Character length
of
(X$)
Current record
number
in random file
X.
Sectors read
or
written since last OPEN in se-
quential file
X.
Number
of
records in random file
X.
Number
of
data sectors in sequential file
X.
Natural log
of
(X)
J characters, starting at
I,
of
string
A$
B-byte string equal to double-precision
floating-point variable (X!)
2-byte string equal to integer variable (X%)
4-byte string equal to single-precision
floating-point variable (X!)
Octal equivalent
of
decimal argument
Single byte from memory location
(X)
Position
of
cursor after last PRINT.
Rightmost
(1%)
characters
of
X$
Single-precision random number between 0
and
1.
Sign
of
(X)
Sine
of
(X)
String
of
(1%)
spaces
String
of
(X%) spaces
Square root
of
(X)
String equal
to
(X)
Character
X,
Y%
times-or
the
first
character
of
A$,
Y% times.
Spaces
to
(X)
position on terminal
Tangent value
of
(X)
References
user
subroutine 0
to
24
Numerical value
of
(X$)
Memory address
of
(X)
Example
DSKF(X)
A
= EOF(X)
ERL
ERR
EXP
(X)
FIX
(X)
FRE
(X)
HEX$(X%)
INP(X)
INPUT$ (X,
Y)
INSTR$
(X$,
Y$)
INT(X)
LEFT$
(A$,
X)
LEN
(X$)
LOC
(X)
LOF (X)
LOG
(X)
MID$
(A$,
I,
J)
MKD$ (A$)
MKI$ (A$)
MKS$(A$)
OCT$(X)
PEEK
(X)
POS
(dummy argument)
RIGHT$
(X$,
1%)
RND
SGN
(X)
SIN
(X)
SPACE$(I%)
SPC(X%)
SQR
(X)
STR$
(X)
STRING$ (Y%,
X)
STRING$ (Y%,
A$)
TAB
(X)
TAN
(X)
AX
=
USR
12
(A1,
A2)
VAL
(X$)
VARPTR(X)
BASIC-80