Start bit – Remote Processing CAMBASIC User Manual
Page 153

Comm ands - 120
START BIT
Tasking Statement
SYNTAX:
START BIT task number [,task number ] . . .
PURPOSE:
To enab le a BIT task tha t has prev iously been de fined with an ON BIT statement.
REMARK S:
You can disable the task using the STOP BIT statement. The ST ART BIT statement will start the
last task that was declare d by the ON BIT statem ent.
If you use START BIT w ithout first defining the task with the ON BIT statement, CA MBASIC
cannot know whether a valid task exists. Attempting to start a nonexistent task will usually produce
nonsense err ors.
See the Multitasking Chapter for more information.
RELATED:
BIT function and statement, ON BIT, STOP BIT
EXAMPLE:
10 ON BIT 0,0,0 GOSUB 60
20 START BIT 0
30 PRINT "waiting..."
40 DELAY .5
50 GOTO 30
60 IF BIT(0,0)=0 THEN PRINT "closed" ELSE
PRINT" open"
70 RETURN
ERROR:
< Data out of range> – If task number > 7
< Data negative> – for task number