AMSTRAD CPC464 User Manual page 149

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

Advertisement

INK
I N K < i n k > , < c o l o u r > [ , < c o l o u r > ]
INK 0,1
COMMAND: Depending on the current Screen Mode (Chapter 5), a number of IN Ks are available.
The colour, or colours, used for an INK may be changed by an INK command, according to the table
of colour values in Appendix IV.
Associated keywords: P E N , P A P E R
INKEY
I N K E Y ( < i n t e g e r e x p r e s s i o n > )
1 0 C L S : I F I N K E Y ( 5 5 ) = 3 2 T H E N 3 0 E L S E 20
2 0 C L S : G O T O 1 0
3 0 P R I N T " Y o u ' r e p r e s s i n g [ S H I F T ] and V"
4 0 F O R t = l T O 1 0 0 0 : N E X T : G O T O 1 0
FUNCTION: This function interrogates the keyboard to report which keys are being pressed. The
keyboard is scanned at 1/50 sec. The function is particularly useful for spotting Y/N responses, since
the state of shift is not required according to one of the interpretation options. The above example
detects when [SHIFT] and V are pressed together. Shift and control are identified according to
Value returned
-1
0
32
128
160
Associated keywords: I N P U T , I N KEY$
INKEY$
INKEY$
10 CLS
2 0 P R I N T " A r e y o u c l e v e r ( y o r n ) ? "
3 0 a $ = I N K E Y $ : I F a $ = " " G O T O 3 0
4 0 I F a $ = " N " O R a $ = " n " T H E N
P R I N T " Y o u m u s t h a v e b e e n t o b u y m e ! " : E N D
5 0 I F a $ = " Y " O R a $ = " y " T H E N
P R I N T " Y o u ' r e t o o m o d e s t ! ! ! " : E N D
6 0 G O T O 2 0
FUNCTION: Reads a key from the keyboard to provide operator interaction without hitting
after every answer. If there is a key pressed, then the function responds - if no key is
[ENTER]
pressed, it continues to return an empty string which is used to loop until a valid input is detected
for processing.
Associated keywords: I N P U T , I N K E Y
[SHIFT]
?
UP
DOWN
UP
DOWN
[CTRL]
?
UP
UP
DOWN
DOWN
KEY
UP
DOWN
DOWN
DOWN
DOWN

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents