pike.ida.liu.se
Search for
Home > Docs > Pike reference

[Top]

enumerate()


Method enumerate

array(int) enumerate(int n)
array enumerate(int n, void|mixed step, void|mixed start, void|function operator)

Description

Create an array with an enumeration, useful for initializing arrays or as first argument to map() or foreach() .

The defaults are: step = 1, start = 0, operator = `+

See also

map() , foreach()

Module reference for Pike v7.8 release 116, 2008-12-31