EasyManua.ls Logo

Commodore 128 - Page 323

Commodore 128
448 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
The actual duration for a whole note is determined by using the
formula given below:
whole note duration = 23.06/n seconds
The default value is 8, and note duration increases with n.
EXAMPLES:
TEMPO 16 Defines the Tempo at 16
TEMPO 1 Defines the TEMPO at the slowest speed
TEMPO 250 Defines the TEMPO at 250
TRAP
Detect and handle program errors while a BASIC program is
RUNning
TRAP [line #]
When turned on, TRAP intercepts all error conditions (excluding
DOS error messages but including the STOP KEY), ln the event
of any execution error, the error flag is set and execution is
transferred to the line number specified in the TRAP statement.
The line number in which the error occurred can be found by
using the system variable EL. The specific error condition is
contained in system variable ER. The string function ERR$ (ER)
gives the error message corresponding to the error condition.
The RESUME statement can be used to resume program
execution. TRAP with no line number turns off error trapping. An
error in a TRAP routine cannot be trapped.
EXAMPLES:
100 TRAP 1000
If an error occurs, go to line 1000
1000 ?ERR$ (ER);EL
Print the error message, and the error line number
17-81

Table of Contents

Other manuals for Commodore 128

Related product manuals