AMSTRAD CPC464 User Manual page 174

Cpc464 colour personal computer 64k
Hide thumbs Also See for CPC464:
Table of Contents

Advertisement

SQ
S Q ( < c h a n n e l > )
1 0 M O D E 1
2 0 F O R n = 2 0 T O 0 S T E P-l
3 0 P R I N T 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: SOUND, ON SQ GOSUB
SQR
SQR(<n u m e r i c e x p r e s s i o n > )
P R I N T S Q R ( 9 )
3
FUNCTION: Returns the square root of <numeric expression>.
Associated keywords: PRINT
STOP
STOP
3 0 0 I F n < 0 T H E N S T O P
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

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents