ds_queue_head

This function will only read the first value of the queue (that which is "at the head"). It will not dequeue the value, meaning that it can still be read in the future by this function or ds_queue_dequeue(). If the queue is empty then the function will return the constant undefined, otherwise it will return the value contained in the queue.

 

Syntax:

ds_queue_head(id);

ArgumentTypeDescription
idDS QueueThe id of the data structure to read from.

 

Returns:

Any (Data type value stored in the queue)

 

Example:

num = ds_queue_head(control_queue);

The above code will read the head value from the queue indexed in the variable "control_queue" and store the return value in the variable "num".