EasyManua.ls Logo

Sinclair QL - Page 149

Sinclair QL
422 pages
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...
22
EXIT
repetition
EXP
maths functions
EXIT will continue processing after the END ot the named FOR or REPeat structure.
syntax: EXIT
identifier
example: 100
REM
start
looping
110
LET
count
=0
120 REPeat
loop
130
LET
count
=
count
+ 1
140 PRINT
count
150
IF
count
= 20
THEN
EXIT
loop
160
END
REPeat
loop
(the loop
will
be exited when count becomes
equal
to
201
il.
100
FOR
n = 1
TO
1000
110
REM
program
statements
120
REM
program
statements
130
IF
RND
>.5
THEN
EXIT n
140
END
FOR
n
(the loop
will
be
eXited
when a random
number greater than
0.5
is
generated)
EXP
will
return the value of e raised
to
the power of the specified parameter.
syntax: EXP
(numeric_expression) (range
-500
.5001
example:
i.
PRINT
EXP
(3)
ii.
PRINT
EXP(3.141592654)
12/84

Other manuals for Sinclair QL

Related product manuals