@: list x int -> object
l@ i:= expr
The binary infix operator "@" realises element access for lists. It binds stronger than any other operator in SALIERI.
There are two different forms of usage for the operator "@": in the form l@ i it is synonymous with the expression getList(l,i); in the form l@ i:= expr, where l has to be the name of a list object, it is synonymous with the statement l := putList(l,i,expr).
Specifying an incorrect position i (not within 1 ... length(l)) causes an error condition.
> l := LIST(1,2,3,4)
> l@3 := 0
Error in command-line:
(occured while executing function "getList")
See also: list (Object Type), getList, putList, Operators and Expressions.