![]() ZBasic System Library
63
ZBasic Microcontrollers
Type
Subroutine
Invocation
ClearQueue(queue)
Parameter
Method
Type
Description
queue
ByRef
array of Byte
The queue to be cleared.
Discussion
This routine modifies the tracking information contained in the queue data structure to indicate that the
queue is empty. If the queue is already empty, this has no effect. If there are characters in the queue,
they will be discarded.
Note that before any queue operations are performed, the queue data structure must be initialized. See
the discussion of OpenQueue() for more details.
Example
Dim inQueue(1 to 40) as Byte
Call OpenQueue(inQueue, SizeOf(inQueue))
Call PutQueueStr(inQueue, "Hello")
Call ClearQueue(inQueue)
After the call to ClearQueue() the queue will no longer contain the characters that were added.
Compatibility
BasicX allows any type for the first parameter. The ZBasic implementation requires that it be an array of
Byte.
|