Commodore 128 System Manual page 355

Table of Contents

Advertisement

The variable DS reads the disk drive command channel and
returns the current status of the drive. To get this information in
words, PRINT DS$. These status variables are used after a disk
operation, like DLOAD or DSAVE, to find out why the red error
light on the disk drive is blinking.
ER, EL and ERR$ are variables used in error trapping routines.
They are usually only useful within a program. ER returns the last
error encountered since the program was RUN. EL is the line
where the error occurred. ERR$ is a function that allows the
program to print one of the BASIC error messages. PRINT
ERR$(ER) prints out the proper error message.
OPERATORS
The BASIC OPERATORS include ARITHMETIC, RELATIONAL
and LOGICAL OPERATORS. The ARITHMETIC operators include
the following signs:
+
addition
subtraction
*
multiplication
/
division
t
raising to a power (exponentiation)
On a line containing more than one operator, there is a set order
in which operations always occur. If several operators are used
together, the computer assigns priorities as follows: First,
exponentiation, then multiplication and division, and last, addition
and subtraction. If two operators have the same priority, then
calculations are performed in order from left to right. If these
operations are to occur in a different order, Commodore 128
BASIC allows giving a calculation a higher priority by placing
parentheses around it. Operations enclosed in parentheses will
be calculated before any other operation. Make sure the
equations have the same number of left and right parentheses, or
a SYNTAX ERROR message is displayed when the program is
run.
19-5

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

128d

Table of Contents