This function will only read the last value of the queue (that which is "at the tail"). It will not remove the value from the structure, meaning that it can be read again by calling this function. If the queue is empty then the function will return the constant undefined, otherwise it will return the value contained in the queue.
ds_queue_tail(id);
Argument | Type | Description |
---|---|---|
id | DS Queue | The id of the data structure to read from. |
Any (Data type value stored in the queue)
num = ds_queue_tail(control_queue);
The above code will read the tail value from the queue indexed in the variable "control_queue" and store the return value in the variable "num".