226 of 318
ZBasic System Library 216 ZX Microcontroller Family PutQueueByte Type Subroutine Invocation PutQueueByte(queue, val) Parameter Method Type Description queue ByRef array of Byte The queue to which to write data. val ByVal Byte The byte value to be written to the queue. Discussion This routine writes the given byte value to the specified queue. If there is insufficient space in the queue, the calling task will suspend until space becomes available. This means that if data is never taken out of the queue thus making room for additional data, the process will never complete. Note that before any queue operations are performed, the queue data structure must be initialized. See the discussion of OpenQueue() for more details. Also, attempting to put data in a queue that has been assigned to a Com port as the receive queue will produce undefined results. Example Dim outQueue(1 to 40) as Byte Call OpenQueue(outQueue, SizeOf(outQueue)) Call PutQueueByte(outQueue, &H55) Compatibility This routine is not available in BasicX compatibility mode. See Also OpenQueue, PutQueue, PutQueueStr