AMSTRAD CPC464 User Manual page 152

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

Advertisement

KEY
K E Y < i n t e g e r e x p r e s s i o n > , < s t r i n g e x p r e s s i o n >
K E Y 1 4 0 , " R U N " + C H R $ ( 1 3 )
COMMAND: Fixes a new function key definition. There are thirty two keyboard ' expansion'
characters in the range 128-159 listed in Appendix III. When one of these characters is read it is
expanded into the string associated with it – although the total number of expansion characters
cannot exceed 100. The KEY command associates a string with a given expansion character.
Associated keywords: KEY DEF
KEY DEF
K E Y D E F <key numb e r > , < r e p e a t > [ , < n o r m a l > [ , < s h i f t e d > [ , < c o n t r o l > ] ] ]
K E Y D E F 4 6 , 1 , 6 3
COMMAND: Associates the value as defined in Appendix III to a key on the keyboard. The above
example converts the N key to print the question mark character ? . (Character number 63).
To return the key to its normal function:
K E Y D E F 4 6 , 1 , 1 1 0
where the character number 110 is the lower case n.
Associated keywords: KEY
LEFT$
L E F T $ ( < s t r i n g e x p r e s s i o n > , < i n t e g e r e x p r e s s i o n > )
10 CLS
2 0 A $ = " A M S T R A D "
3 0 B $ = L E F T $ ( A $ , 3 )
4 0 P R I N T B $
RUN
[ S C R E E N CLEARS]
AMS
Ready
FUNCTION: Extracts characters to the left of, and including the position specified in the <integer
expression> from the the given (string expression). If the (string ex-pression is shorter than the
required length, the whole <string expression, is re-turned.
Associated keywords: M I D $ , R I G H T $

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents