Stop inp – Remote Processing CAMBASIC User Manual

Page 159

Advertising
background image

Comm ands - 126

STOP INP

Tasking Statement

SYNTAX:

STOP INP n [, n 1] [, n 2]

PURPOSE:

To disable one or m ore IN P tasks dec lared by th e ON INP statement.

REMARK S:

The task parameters ar e defined by the ON INP statement. STOP IN P deactivates the task. You
may specify more than one task param eter so that several tasks may be stopped simultaneously.

NOTE: STOP IN P is only executed after a START IN P has been executed.

RELATED:

S T A R T I N P , O N IN P

See the Multitasking Chapter for more information.

EXAMPLE:

This demonstration program can be expanded to do more complex tasks. The state of the input lines
are printed by line 40. After 10 seconds, the task is disabled. After 30 seconds it is enabled again.

10 CLEAR TICK
20 ON INP 0,3,7,5 GOSUB 80
30 START INP 0
40 PRINT BIN$(INP(0))
50 DELAY .25
60 IF (TICK(0) > 10)AND(TICK(0)< 30) THEN STOP INP 0 ELSE START INP 0
70 GOTO 40
80 PRINT "match"
90 RETURN

ERROR:

< Data negative> – for n
< Data out of range> – if n > 7

Advertising