![]() ZBasic System Library
113
ZBasic Microcontrollers
Type
Subroutine
Invocation
DrainQueue(queue, count)
Parameter
Method
Type
Description
queue
ByRef
array of Byte
The queue to be drained.
count
ByVal
anyIntegral
The number of bytes to remove.
Discussion
This routine removed up to the specified number of bytes of data from the queue.
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 DrainQueue(inQueue, 3)
After the call to DrainQueue() the queue will contain only l and o.
Compatibility
This routine is not available in BasicX mode.
|