ds_priority_size(id);
参数 | 描述 |
---|---|
id | 要检查的数据结构的id。 |
返回: Real(实数)
此函数将返回优先级队列的“大小”,即:已在其中划分优先级的项目数。
if !ds_priority_empty(control_priority)
{
num = ds_priority_size(control_priority);
}
上面的代码检查ds_priority队列以查看它是否为空,如果不是,则获取它包含的项目数并将值存储在变量中。