Remote-processing CAMBASIC Manuale Utente Pagina 100

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 208
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 99
Commands - 67
KEYPAD$
Process Function
SYNTAX: a$= KEYPAD$(0)
a= KEYPAD$(1)
PURPOSE: To return a one– character string in response to a keypad input or return the position of the key.
REMARK S: KEYPAD$(0) returns a single– character string that has been assigned to a key. It is most useful on
16– key devices. If no key was pr essed , or if you r ead the keypad again before another key is
pressed, a null string is returned.
KEYPAD$(1) r eturns the key position. Keypads often have legends that ar e not single letters. T hus,
the first syntax may not make sense. If no key was pressed, or if you read the keypad again before
another key is pressed, a zero is returned.
A table in RAM can be programmed to return any A SCII value. The table is set up so that the first
character is in the upper– left– hand corner and the last character is in the lower– right– hand
corner. See SYS(8).
You can assign a single character string to the keys in the following manner.
10 FOR X=0 TO 15
20 READ A$
30 POKE SYS(8)+X,ASC(A$)
40 NEXT
50 DATA 1,2,3,A,4,5,6,B,7,8,9,C,*,0,#,D
This example matches many 16 position keypads.
RELATED: ON KEYPAD$, INPUT KEYPAD$
EXAMPLES: 40 ON KEYPAD$ GOSUB..Key_interrupt
50 GOTO 50
60 ..Key_interrupt
70 PRINT KEYPAD$(0)
80 RETURN
The RPC-2350 requres an extra parameter (16 or 24) after KEYPAD$ to designate keypad size.
ERROR: none
Vedere la pagina 99
1 2 ... 95 96 97 98 99 100 101 102 103 104 105 ... 207 208

Commenti su questo manuale

Nessun commento