
Example
ON READER(1) GOSUB BcrData_1
ON READER(2) GOSUB BcrData_2
...
BcrData_1:
LOCK
BEEP(2000,5)
Data$ = GET_READER_DATA(1)$
GOSUB AddNewData
UNLOCK
RETURN
BcrData_2:
BEEP(2000,5)
Data$ = GET_READER_DATA(2)$
GOSUB AddNewData
RETURN
In this example, the BASIC program can trap the READER(1) and READER(2)
events and reroute to the subroutines BcrData_1 and BcrData_2 respectively. In
BcrData_1, the command LOCK disables all the activated event triggers so that the
subroutine BcrData_1 will not be interrupted by a new upcoming READER(1)
and/or READER(2) event. On the other hand, since LOCK is not called in
BcrData_2, any new coming READER(1) and READER(2) event will interrupt the
ongoing BcrData_2, and therefore, may affect the expected results.
See Also
UNLOCK
UNLOCK
Purpose
To release all the activated event triggers held by the LOCK command.
Syntax
UNLOCK
Remarks
Example
Refer to the LOCK command.
See Also
LOCK
Kommentare zu diesen Handbüchern