
SQ
SQ(<channel>)
10 MODE 1
20 FOR n=20 TO 0 STEP-l
30 PRINT n;
4 0 S O U N D 1 , 1 0 + n , l 0 0 , 7
5 0 W H I L E S Q ( 1 ) > 1 2 7 : W E N D
60 NEXT
FUNCTION: The S Q function is used to check the number of free entries in the queue for a given
channel, where channel A is 1, B is 2, and C is 3. The function determines whether the channel is
active
-
and if not
-
why the entry at the head of the queue (if any) is waiting. The result is bit
significant:
0,1,2 indicate the number of free entries in the queue
3,4,5 indicate the Rendezvous state at the head of the queue (if any)
6 is set if the head of the queue is held
7 is set if the channel is currently active
Associated keywords:
S O U N D , O N S Q G O S U B
SQR
SQR(<n u m e r i c e x p r e s s i o n > )
PRINT SQR(9)
3
FUNCTION: Returns the square root of <numeric expression>.
Associated keywords:
STOP
STOP
300 IF n<0 THEN STOP
COMMAND: To stop execution of a program, but leave BASIC in a state where the program can be
restarted after the
STOP
command by using the
CONT
command. This may be used to interrupt the
program at a particular point when debugging.
Associated keywords:
CONT, END
Summary of Contents for CPC464
Page 1: ......
Page 102: ...PRINT 10 AND 12 Results in 8 PRINT 10 AND 1000 Results in 8 again ...
Page 118: ...TO DO DRAW THIS PAGE ...
Page 219: ...actual value may be made to vary during the execution of a program ...
Page 240: ...Text and WINDOW planner Mode 2 80 Columns ...
Page 241: ......