EasyManua.ls Logo

Sinclair ZX81 - Page 89

Sinclair ZX81
92 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
The following are binary operations:
* Both operands must be of the same type. The result is a number, 1 if the comparison holds & 0 if it does
not.
Functions & operations have the following priorities:
Statements
In this list,
Note that arbitrary expressions are allowed everywhere (except for the line numbers at the beginning of
a statement).
All statements except
INPUT
can be used either as commands or in programs (although they may be
more sensible in one than the other).
TAN
number (in radians) Tangent
USR
number Calls the machine code subroutine whose starting address is x (rounded
to the nearest integer). On return, the result is the contents of the bc
register pair. Error B if x is not in the range 0 to 65535.
VAL
string Evaluates x (without its bounding quotes) as a numerical expression.
Error C if x contains a syntax error, or gives a string value.
Other errors possible, depending on the expression.
- number Negation
+ Additional (on numbers), or concatination (on strings).
- Subtraction
* Multiplication
/ Division
**
Raising to a power. Error B if the left operand is negative.
= Equals*
> Greater than*
< Less than*
<=
Less than or equal to*
>=
Greater than or equal to*
<>
Not equal to*
Operation Priority
Subscripting & slicing 12
All functions except
NOT
and unary minus 11
** 10
Unary minus 9
* , / 8
+ , - (binary -) 6
= , > , < ,
<=
,
>=
,
<>
5
NOT
4
AND
3
OR
2
α represents a single letter
v represents a variable
x,y,z represent numerical expressions
m,n represent numerical expressions that are rounded to the nearest integer
e represents an expression
f represents a string valued expression
s represents a stetement

Other manuals for Sinclair ZX81

Related product manuals