Overview
This list uses the same letters to represent variables, expressions and sequences etc. as the ZX Spectrum BASIC manual.
Items which use Greek letters
α (alpha)
β (beta)
represents a single letter.
Definable functions and string variables can only be defined with a single letter.
Items which use Latin letters
v
represents a variable.
This could be numeric, or string (in the case of a string variable v or v$ are used), or v could represent both types.
x,y,z
the letters x,y, or z, represent numerical expressions or any real number.
m,n
represents numerical expressions rounded to the nearest integer. Positive or negative whole numbers, and zero.
b
represents a binary number. In the case of BIN b , b is not a variable, but a stand-in for any binary number.
h
represents a hexadecimal number. Sinclair BASIC does not have a function to convert a hexadecimal humber to a decimal number or vice versa.
The letter h is used when comparing other versions of BASIC, for example some versions may use a function such as HEX$, so HEX$(h)
could mean convert the hexadecimal number h to decimal.
e
represents an expression.
f
represents a string valued expression. This could be a string value like "Spectrum" or a string variable.
s
represents a sequence of statements separated by colons.
c
represents a sequence of colour items, each terminated by commas (,) or semi-colons (;).
A colour item has the form of a PAPER, INK, FLASH, BRIGHT, INVERSE or OVER statement.
Special considerations for the ZX Spectrum+ 128K
d
represents a string that evaluates to a valid drive, ie. A:, B:, M: or T:.
u
represents an unambiguous DOS filename.
a
represents a DOS filename that may be ambiguous, ie. one that may contain the wildcards * or ?.
Styling
italics
are parameters in explanatory word form. For instance: PRINT #channel.
BOLD
represents keywords. For instance: BEEP.
Symbols
Curved brackets or parentheses
( )
Where curved brackets '(' or ')' are shown they are mandatory, this includes the ZX Spectrum 'two parameter' functions and user defined functions, for example ATTR, POINT, SCREEN$.
Square brackets
[ ]
Where square brackets '[' or ']' are shown the statement, parameter or value inside the bracket is optional.
In this example: CLEAR [n]
the CLEAR statement may be used on its own, or with the optional value of n.
Vertical pipe
¦
A vertical pipe means either the expression on the left of the pipe, or the one on the right.
For example, GO TO n¦e
means GO TO line number n or a line number derived from expression e.
Three dots
...
Three dots '...' can mean multiple expressions follow. It also means 'and so on'.
Examples are:
PRINT ...
means PRINT followed by any number of expressions.
READ e1,e2,e3,...
means READ data item e1,e2,e3 and so on.
Greater or equal to
≥
When used in a mathematical context, rather than a programming context, this symbol is used instead of the >= keyword.
Less or equal to
≥
When used in a mathematical context, rather than a programming context, this symbol is used instead of the <= keyword.
Not equal to
≠
When used in a mathematical context, rather than a programming context, this symbol is used instead of the <> keyword.
Regarding the use of kilobyte (K)
Throughout this website, the term kilobyte (K) is used to denote a measure of 1024 bytes of digital memory capacity. 1024 or 210 is a binary derived number, whereas kilo is a decimal prefix meaning 1000 or 103. The correct terms to use are kibibyte (KiB) for 1024 bytes, and kilobyte for 1000 bytes. However, these terms were only introduced in 1998 and since the ZX Spectrum and most other 8-bit microcomputers precede this time by at least 15 years and considering that by today's standards of memory capacity the ZX Spectrum's 48K (or 48KiB) is quite small I shall consider this fact virtually insignificant and continue to use the original albeit non-standard term kilobyte (K) to mean 1024 bytes.
Last revision : 28/07/2024