Extracted from Pike v7.4 release 117 at 2004-07-26.
pike.ida.liu.se
[Top]
predef::

Method `->=()


Method `->=

mixed `->=(object arg, string index, mixed val)
mixed `->=(mapping arg, string index, mixed val)
int(0..1) `->=(multiset arg, string index, int(0..1) val)

Description

Arrow assign operator.

This function behaves much like `[]=() , just that the index is always a string.

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:
object

The non-static (ie public) variable named index will be looked up in arg , and assigned val .

array|mapping

Index index in arg will be assigned val .

multiset

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.


Returns

val will be returned.

See also

`[]=() , lfun::`->=()