
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
KEY DEF <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 > ] ] ]
KEY DEF 46,1,63
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:
KEY DEF 46,1,110
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 $ = "AMSTRAD"
3 0 B $ = LEFT$(A$,3)
40 PRINT B$
RUN
[SCREEN 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:
MID$, RIGHT$
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: ......