BASIC function extensions

From BeebWiki
Jump to: navigation, search
&...               Hex constant
%...               Binary constant
&o...              Octal constant
&O...              Octal constant

^identifier        Address of identifier

STR$num            Convert to decimal string
STR$~num           Convert to hex string
STR$/num           Convert to binary string
STR$=num           Convert to octal string

COLOUR(r,g,b)      Logical colour closest to (r,g,b)
GCOL(r,g,b)        Logical colour closest to (r,g,b)

GET                Wait for keypress                       OSRDCH
GET$               Wait for keypress                       OSRDCH
GET$#num           Read string from file                   OSBGET
GET(num)           Read from I/O port
GET(num,num)       Read character from character position
GET$(num,num)      Read character from character position

LINE
LINE linenumber

MODE               Read current screen MODE               OSBYTE &87
VDU offset         Read VDU variable                      OSBYTE 160,offset
WIDTH              Width as set with WIDTH command

FNname[(parameters)]
FN(address)[(parameters)]

DIM(array())
DIM(array(),element)