pike.git / src / operators.c

version» Context lines:

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.172 2003/03/14 15:50:46 grubba Exp $ + || $Id: operators.c,v 1.173 2003/04/01 18:11:09 nilsson Exp $   */      #include "global.h"   #include <math.h> - RCSID("$Id: operators.c,v 1.172 2003/03/14 15:50:46 grubba Exp $"); + RCSID("$Id: operators.c,v 1.173 2003/04/01 18:11:09 nilsson 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:205:    *! @endmixed    *! @type array    *! The arrays will be concatenated.    *! @type mapping    *! The mappings will be joined.    *! @type multiset    *! The multisets will be added.    *! @endmixed    *!    *! Otherwise if there are more than 2 arguments the result will be: -  *! @code{`+(`+(@[arg1], @[arg2]), @@@[extras])@} +  *! @expr{`+(`+(@[arg1], @[arg2]), @@@[extras])@}    *!    *! @note    *! In Pike 7.0 and earlier the addition order was unspecified.    *!    *! If @[arg1] is @tt{UNDEFINED@} it will behave as the empty    *! array/mapping/multiset if needed. This behaviour was new    *! in Pike 7.0.    *!    *! @seealso    *! @[`-()], @[lfun::`+()], @[lfun::``+()]
pike.git/src/operators.c:1070:    *! @decl mixed `-(mixed arg1, mixed arg2, mixed ... extras)    *!    *! Negation/subtraction operator.    *!    *! @returns    *! If there's only a single argument, that argument will be returned    *! negated. If @[arg1] was an object, @expr{@[arg1]::`-()@} will be called    *! without arguments.    *!    *! If there are more than two arguments the result will be: -  *! @code{`-(`-(@[arg1], @[arg2]), @@@[extras])@}. +  *! @expr{`-(`-(@[arg1], @[arg2]), @@@[extras])@}.    *!    *! If @[arg1] is an object that overloads @tt{`-()@}, that function will    *! be called with @[arg2] as the single argument.    *!    *! If @[arg2] is an object that overloads @tt{``-()@}, that function will    *! be called with @[arg1] as the single argument.    *!    *! Otherwise the result will be as follows:    *! @mixed arg1    *! @type mapping
pike.git/src/operators.c:1445:    *! @decl mapping `&(mapping arg1, multiset arg2)    *! @decl mapping `&(multiset arg1, mapping arg2)    *! @decl mixed `&(mixed arg1, mixed arg2, mixed ... extras)    *!    *! Bitwise and/intersection operator.    *!    *! @returns    *! If there's a single argument, that argument will be returned.    *!    *! If there are more than two arguments, the result will be: -  *! @code{`&(`&(@[arg1], @[arg2]), @@@[extras])@}. +  *! @expr{`&(`&(@[arg1], @[arg2]), @@@[extras])@}.    *!    *! If @[arg1] is an object that has an @[lfun::`&()], that function    *! will be called with @[arg2] as the single argument.    *!    *! If @[arg2] is an object that has an @[lfun::``&()], that function    *! will be called with @[arg1] as the single argument.    *!    *! Otherwise the result will be as follows:    *! @mixed arg1    *! @type int
pike.git/src/operators.c:1651:    *! @decl string `|(string arg1, string arg2)    *! @decl type `|(program|type arg1, program|type arg2)    *! @decl mixed `|(mixed arg1, mixed arg2, mixed ... extras)    *!    *! Bitwise or/join operator.    *!    *! @returns    *! If there's a single argument, that argument will be returned.    *!    *! If there are more than two arguments, the result will be: -  *! @code{`|(`|(@[arg1], @[arg2]), @@@[extras])@}. +  *! @expr{`|(`|(@[arg1], @[arg2]), @@@[extras])@}.    *!    *! If @[arg1] is an object that has an @[lfun::`|()], that function    *! will be called with @[arg2] as the single argument.    *!    *! If @[arg2] is an object that has an @[lfun::``|()], that function    *! will be called with @[arg1] as the single argument.    *!    *! Otherwise the result will be as follows:    *! @mixed arg1    *! @type int
pike.git/src/operators.c:1860:    *! @decl string `^(string arg1, string arg2)    *! @decl type `^(program|type arg1, program|type arg2)    *! @decl mixed `^(mixed arg1, mixed arg2, mixed ... extras)    *!    *! Exclusive or operator.    *!    *! @returns    *! If there's a single argument, that argument will be returned.    *!    *! If there are more than two arguments, the result will be: -  *! @code{`^(`^(@[arg1], @[arg2]), @@@[extras])@}. +  *! @expr{`^(`^(@[arg1], @[arg2]), @@@[extras])@}.    *!    *! If @[arg1] is an object that has an @[lfun::`^()], that function    *! will be called with @[arg2] as the single argument.    *!    *! If @[arg2] is an object that has an @[lfun::``^()], that function    *! will be called with @[arg1] as the single argument.    *!    *! Otherwise the result will be as follows:    *! @mixed arg1    *! @type int