keychrd 10 **************************** * * * HP-71 KEYCHR$ FUNCTION * * * **************************** The KEYCHR$ function puts the HP-71 into a low power consumption state, and then waits for a key to be pressed. A single ASCII character (or optional string) representing the key(s) pressed is returned. For example: Pressing the Q key will return "Q"; Pressing the [g]Q key will return "q"; Pressing the [f]Q key will return CHR$(223); Pressing the [g]+ key will return "?"; Pressing the 'ENDLINE' key will return CHR$(13). When responding to KEYCHR$ from the HP-71 keyboard, the LC (Lowercase) setting is ignored. SYNTAX: KEYCHR$ or KEYCHR$(key count) where key count (n) is an optional numeric expression rounded to an integer in the range 1<=n<=15. KEYCHR$ waits for the number of keys specified by the key count to be pressed. If a parameter is not supplied, KEYCHR$ waits for one key to be pressed. EXAMPLES: K$=KEYCHR$ Wait for one key to be pressed. K$=KEYCHR$(3) Wait for 3 keys to be pressed. 50 DISP "Edit, Add, Del, Quit" 60 M=POS("EADQ",UPRC$(KEYCHR$))+1 ! Used in a program. 70 ON M GOTO 50, .......... 100 IF KEYCHR$(2)=P$ THEN ...... ELSE ...... RELATED KEYWORDS: KEY$, KEYWAIT$.