[Contents] · [Home] · [Mail]

SALIERI Language - getList

getList: list x integer -> object

Call syntax:
getList(aList, index)
aList @index

Returns object from position index in list aList; position counting starts with 1 for the first element. The variant using the @-operator can be used synonymously; its use is encouraged for the sake of brevity and improved readability of SALIERI code.

Error conditions:
Specifying an incorrect position (not within length (aList)) causes an error condition.

> getList(LIST(1,2,3,4), 3)
Result= 3
> LIST(1,2,3,4)@3
Result= 3
> getList(LIST(1,2,3,4), 5)
Error in command-line:
Wrong index
(occured while executing function "getList")

See also: LIST, LISTINIT, consList, putList, inList, Operator "@".

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