[Contents] · [Home] · [Mail]

SALIERI Language - LISTINIT

Type:
LISTINIT: integer x object -> list

Call syntax:
LISTINIT(nrOfClones, original)

Description:
The constructor function LISTINIT returns a list consisting of nrOfClones copies of objekt original. This function should be used to initialize lists of fixed length (arrays) rather then iteratively constructing these for efficiency reasons.

Error conditions:
For negative values of nrOfClones, LISTINIT returns an empty list without causing an error condition.

Example:
> LISTINIT(3,0)
Result= LIST(0,0,0)
> LISTINIT(3,"hallo")
Result= LIST("hallo", "hallo", "hallo")
> LISTINIT(-3,"arg")
Result= LIST()

See also: LIST, consList. putList, getList, inList.


[Contents] · [Home] · [Mail]
© sic!systems, page frame designed by hh; this page has been automatically generated from the SALIERI Documentation Database.