Branch: Tag:

2003-04-17

2003-04-17 22:51:13 by Martin Stjernholm <mast@lysator.liu.se>

Document `+=.

Rev: src/operators.c:1.175
Rev: src/program.c:1.499

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: operators.c,v 1.174 2003/04/07 17:28:55 nilsson Exp $ + || $Id: operators.c,v 1.175 2003/04/17 22:51:13 mast Exp $   */      #include "global.h"   #include <math.h> - RCSID("$Id: operators.c,v 1.174 2003/04/07 17:28:55 nilsson Exp $"); + RCSID("$Id: operators.c,v 1.175 2003/04/17 22:51:13 mast Exp $");   #include "interpret.h"   #include "svalue.h"   #include "multiset.h"
180:    *! @returns    *! If there's only a single argument, that argument will be returned.    *! -  *! If @[arg1] is an object and it has an @[lfun::`+()], -  *! that function will be called with the rest of the arguments, -  *! and the result returned. +  *! If @[arg1] is an object with only one reference and an +  *! @[lfun::`+=()], that function will be called with the rest of +  *! the arguments, and its result is returned.    *! -  +  *! Otherwise, if @[arg1] is an object with an @[lfun::`+()], that +  *! function will be called with the rest of the arguments, and its +  *! result is returned. +  *!    *! Otherwise if any of the other arguments is an object that has    *! an @[lfun::``+()] the first such function will be called -  *! with the arguments leading up to it, and @[`+()] be called recursively -  *! with the result and the rest of the arguments. +  *! with the arguments leading up to it, and @[`+()] is then called +  *! recursively with the result and the rest of the arguments.    *!    *! If there are two arguments the result will be:    *! @mixed arg1