sq_next |
SQRESULT sq_next(
HSQUIRRELVM v, SQInteger idx)
;
Pushes in the stack the next key and value of an array, table or class slot. To start the iteration this function expects a null value on top of the stack; at every call the function will substitute the null value with an iterator and push key and value of the container slot. Every iteration the application has to pop the previous key and value but leave the iterator(that is used as reference point for the next iteration). The function will fail when all slots have been iterated(see Tables and arrays manipulation).
- parameters:
-
- HSQUIRRELVM v
-
the target VM
- SQInteger idx
-
index of the target object in the stack
- return:
-
a SQRESULT