Method lfun::`+=()
- Method
`+=
this_program
`+=(zero
arg
)- Description
Destructive addition/concatenation callback.
This is used by `+. It's called with the argument that follow this object in the argument list of the call to `+. It should update this object to represent the addition/concatenation between it and the argument. It should always return this object.
- Note
This function should only be implemented if lfun::`+() also is. It should only work as a more optimized alternative to that one, for the case when it's safe to change the object destructively and use it directly as the result.
- Note
This function is not an lfun for the
+=
operator. It's only whether or not it's safe to do a destructive change that decides if this function or lfun::`+() is called; both the+
operator and the+=
operator can call either one.- Note
In versions of Pike prior to 8.1.10 this function could get called with multiple arguments.
- See also