KEY
KEY <integer expression>,<string expression>
KEY 140,"RUN"+CHR$(13)
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 number>,<repeat>[,<normal>[,<shifted>[,<control>]]]
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$
LEFT$(<string expression>,<integer expression>)
10 CLS
20 A$ = "AMSTRAD"
30 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$