EasyManuals Logo

CipherLab 8300 User Manual

CipherLab 8300
263 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #71 background imageLoading...
Page #71 background image
59
Chapter 4 BASIC Commands
4.5.2 LOCK AND UNLOCK
Event trapping could be nested. If the event triggers are activated in a BASIC program, it
is possible that an event-driven subroutine can be interrupted by any upcoming events.
Normally, the new event would be processed first.
In some cases where we dont want the event-driven subroutine to be interrupted by
other events, the commands LOCK and UNLOCK can be used to hold off new events.
LOCK
Purpose To hold all the activated event triggers until they are released by UNLOCK.
Syntax LOCK
Remarks This command can prevent nesting of event triggers. All the ac
tivated event
triggers will be disabled until UNLOCK is called.
In the example below, 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 inter
rupt the ongoing BcrData_2, and therefore, may affect the expected
results.
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

Table of Contents

Other manuals for CipherLab 8300

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the CipherLab 8300 and is the answer not in the manual?

CipherLab 8300 Specifications

General IconGeneral
BrandCipherLab
Model8300
CategoryPDA
LanguageEnglish

Related product manuals