Remote-processing CAMBASIC Manuale Utente Pagina 118

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 208
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 117
Commands - 85
ON COUNT
Tasking Statement
SYNTAX: ON COUNT n GOSUB line/label
ON COUNT n GOSUB
PURPOSE: To execute a subroutine when a preset count is reached.
REMARK S: To use this statement you must first set up a counter with CONFIG COUN T and specify a preset
count.
Every time the preset count is reached, the counter is reset to zero and program flow br anches to the
routine specified by line. When the subroutine is finished, the progr am will resume execution.
If the line is not specified after the GOSUB, the function is disabled.
The parameter n is the counter number which ranges fr om 0 to 7.
See the Multitasking Chapter for more information.
RELATED: CLEAR COUNT, COUNT, START COUNT, STOP COUNT, RESUME COUNT
EXAMPLE: 10 CONFIG PI0 0,1,1,1,1 : 'SET FOR INPUTS
20 CONFIG COUNT 0,0,0,500,AUTO
30 ON COUNT 0 GOSUB 60
35 START COUNT 0
40 '
50 GOTO 40
60 PRINT "limit reached"
70 RETURN
ERROR: < Data negative> for n
< Data out of range> n > 7
< Can’t compile> if line/label does not exist
Vedere la pagina 117
1 2 ... 113 114 115 116 117 118 119 120 121 122 123 ... 207 208

Commenti su questo manuale

Nessun commento