Basic Keywords - AMSTRAD cpc 6128 User Instruction

Integrated computer/disc system
Hide thumbs Also See for cpc 6128:
Table of Contents

Advertisement

ERR
may also return
3 1
if access was attempted when no file was open. The usual
way in which one may use
ERR
and
D ERR
would be to include an
0 N
ERR 0 R GOT 0
which calls a short routine that checks if
ERR
has the value
3 1
or
32, and if it is 32,
DE R R
could be interrogated to give more detailed information
regarding the nature of the error. For example:
10 ON ERROR GOTO 1000
20 OPENOUT "myfi le.asc"
30 WRITE #9,"test-data"
40 CLOSEOUT
50 END
1000 amsdoserr=(DERR AND &7F):REM mask off bit 7
1010 IF ERR<31 THEN END
1020 IF ERR=31 THEN PRINT "are you sure you've typed
line 20 correctly?":END
1030 IF amsdoserr=20 THEN PRINT "disc is full, suggest
you use a new data disc":END
1040 IF amsdoserr=&X01001000 THEN PRINT "put a disc in
the drive, then press a key":WHILE INKEY$="":
WEND:RESUME
1050 END
Part 7: BASIC Keywords
The following is a list of all AMSTRAD CPC6128 BASIC keywords. As such, they are
reserved and can NOT be used as variable names.
ABS, AFTER, AND, ASC, ATN, AUTO
BIN$, BORDER
CALL, CAT, CHAIN, CHR$, CINT, CLEAR, CLG, CLOSEIN, CLOSEOUT, CLS,
CONT, COPYCHR$, COS, CREAL, CURSOR
DATA, DEC$, DEF, DEFINT, DEFREAL, DEFSTR, DEG, DELETE, DERR, DI,
DIM, DRAW, DRAWR
EDIT, El, ELSE, END, ENT, ENV, EOF, ERASE, ERL, ERR, ERROR, EVERY,
EXP
FILL, FIX, FN, FOR, FRAME, FRE
Chapter 7 Page 32
For your reference ....

Advertisement

Table of Contents
loading

Table of Contents