- Method `=
mixed `=(object arg, mixed index, mixed val)
mixed `=(object arg, string index, mixed val)
mixed `=(array arg, int index, mixed val)
mixed `=(mapping arg, mixed index, mixed val)
int(0..1) `=(multiset arg, mixed index, int(0..1) val)
Every lvalue expression with the
operator becomes a call to this function, i.e.
a[b]=cis the same as
If arg is an object that implements lfun::`=(), that function will be called with index and val as the arguments.arg can have any of the following types:
The non-protected (ie public) variable named index will be looked up in arg, and assigned val.
Index index in arg will be assigned val.
If val is
0(zero), one occurrance of index in arg will be removed. Otherwise index will be added to arg if it is not already there.
val will be returned.
An indexing expression in a non-lvalue context, i.e. where the index is being queried instead of assigned, uses ` instead of this function.
- See also