8 Concise reference
guide to
AMSTRAD BASIC
A listing of BASIC keywords illustrated by examples, giving the
precise form of use and associated keywords.
Subjects covered in this chapter
* The form of the notation
* Special characters and their significance
* All AMSTRAD BASIC keywords in alphabetical order
This chapter contains a concise summary of the functions in the BASIC
supplied in ROM with the CPC464. The range of features available
represents an industry-standard implementation of the language with
specific extensions to complement the hardware features of the CPC464.
8.1 Notation.
Special Characters
& or &H Prefix for hexadecimal constant
&X Prefix for binary constant
: Separates statements typed on the same line
# Prefix for stream director
Data types
Strings may be from 0 to 255 characters long, and are expressed as <string expression>. Strings may
be appended to one another using the + operator, as long as the resulting <string expression> is less
than 255 characters long.
Numeric data can be either Integer or real. Integer data is held in the range –32768 ....32767 and
real data is held to a little over nine digits of precision in the range ?1.7E+38 with the smallest value
above zero approximately 2.9E-39.
Type markers are % Integer, ! real, $ string.
A <numeric expression> is any expression that results in a numeric value: it may simply be
numbers, or it may be a numeric variable, or it may be numbers operated on by variables. Just about
anything that is not a <string expression>.