[Top]
|
Method `->()
- Method
`->
mixed `->(object arg, string index)
mixed `->(int arg, string index)
mixed `->(array arg, string index)
mixed `->(mapping arg, string index)
int(0..1) `->(multiset arg, string index)
mixed `->(program arg, string index)
- Description
-
Arrow index operator.
This function behaves much like `[], just that the index is always
a string.
- Returns
If arg is an object that implements lfun::`->(), that function
will be called with index as the single argument.
Otherwise the result will be as follows:
arg can have any of the following types:
| object | The non-static (ie public) symbol named index will be looked up
in arg.
|
| int | The bignum function named index will be looked up in arg.
|
| array | An array of all elements in arg arrow indexed with index
will be returned.
|
| mapping | If index exists in arg the corresponding value will be
returned. Otherwise UNDEFINED will be returned.
|
| multiset | If index exists in arg, 1 will be returned.
Otherwise UNDEFINED will be returned.
|
| program | The non-static (ie public) constant symbol index will be
looked up in arg.
|
|
- See also
`[], lfun::`->(), ::`->()
|