Skip to Content

Operators and Special Symbols

The following list is a rather terse summary of the meaning of the various operators and special symbols used by BBC BASIC(Z80). It is provided for reference purposes; you will find more detailed explanations elsewhere in this manual.

?A unary and binary operator giving 8 bit indirection.
!A unary and binary operator giving 32 bit indirection.
”A delimiting character in strings. Strings always have an even number of ” in them. ” may be introduced into a string by the escape convention "".
#Precedes reference to a file channel number (and is not optional).
$

A character indicating that the object has something to do with a string. The syntax $<expression> may be used to position a string anywhere in memory, overriding the interpreter’s space allocation. As a suffix on a variable name it indicates a string variable.

$A=“WOMBAT” Store WOMBAT at address A followed by CR.

%A suffix on a variable name indicating an integer variable.
&Precedes hexadecimal constants e.g. &EF.
‘A character which causes new lines in PRINT or INPUT.
( )Objects in parentheses have the highest priority.
=‘Becomes’ for LET statement and FOR, ‘result is’ for FN, relation of equal to on integers, reals and strings.
-Unary negation and binary subtraction on integers and reals.
*Binary multiplication on integers and reals; statement indicating operating system command (*DIR, *OPT).
:Multi-statement line statement delimiter.
;Suppresses forthcoming action in PRINT. Comment delimiter in the assembler. Delimiter in VDU and INPUT.
+Unary plus and binary addition on integers and reals; concatenation between strings.
,Delimiter in lists.
.Decimal point in real constants; abbreviation symbol on keyword entry; introduce label in assembler.
<Relation of less than on integers, reals and strings.
>Relation of greater than on integers, reals and strings.
/Binary division on integers and reals.
\Alternative comment delimiter in the assembler.
<=Relation of less than or equal on integers, reals and strings.
>=Relation of greater than or equal on integers, reals and strings.
<>Relation of not equal on integers, reals and strings.
[ ]Delimiters for assembler statements. Statements between these delimiters may need to be assembled twice in order to resolve any forward references. The pseudo operation OPT (initially 3) controls errors and listing.
^Binary operation of exponentiation between integers and reals.
~A character in the start of a print field indicating that the item is to be printed in hexadecimal. Also used with STR$ to cause conversion to a hexadecimal string.
Last updated on