Previous topic

obj_info

Next topic

obj_load

This Page

obj_keysΒΆ

obj_keys returns all keys or a range of keys for the given object.

keys = obj_keys(obj)
keys = obj_keys(obj, start)
keys = obj_keys(obj, start, end)

Return Value

keys is an array of integer numbers or strings.

Parameters

obj

obj is the object created with obj_create.

start

start is the first key.

end

end is the predecessor of the last key. start and end must be of the same type, both strings or both numbers.

Example

obj = obj_create()
for (i in 1:10000) {
    idx = rand(1,1) *100000;
    obj[idx] = i;
}
print obj.keys(1,1000)

Comment

obj.keys() returns the string keys. obj.keys(1) returns all number keys greater or equal to 1. obj.keys(1, 10) returns all number keys in the range 1 to < 10.

id-1690081