ds_queue_size

此函数将返回队列的"大小",即已排入队列的项目数。

 

语法:

ds_queue_size(id);

参数类型描述
idDS Queue要检查的数据结构的ID。

 

返回:

Real

 

例子:

if (!ds_queue_empty(control_queue))
{
    num = ds_queue_size(control_queue);
}

上述代码检查DS队列以查看其是否为空,如果不为空,则获取其包含的项目数,并将该值存储在变量中。