pike.git
/
src
/
operators.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/operators.c:1:
/* || 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" #include "mapping.h" #include "array.h" #include "stralloc.h" #include "opcodes.h" #include "operators.h" #include "language.h" #include "pike_memory.h"
pike.git/src/operators.c:173:
*! @decl array `+(array arg1, array arg2) *! @decl mapping `+(mapping arg1, mapping arg2) *! @decl multiset `+(multiset arg1, multiset arg2) *! @decl mixed `+(mixed arg1, mixed arg2, mixed ... extras) *! *! Addition operator. *! *! @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 *! @type string *! @[arg2] will be converted to a string, and the result the *! strings concatenated. *! @type int|float *! @mixed arg2 *! @type string *! @[arg1] will be converted to string, and the result the