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.
234
2008/06/
16
21
:
52
:
24
mast Exp $
+
|| $Id: operators.c,v 1.
235
2008/06/
28
22
:
05
:
04
mast Exp $
*/ #include "global.h" #include <math.h> #include "interpret.h" #include "svalue.h" #include "multiset.h" #include "mapping.h" #include "array.h" #include "stralloc.h"
pike.git/src/operators.c:4936:
*! @expr{predef::`[](a,i)@}. *! *! @returns *! If @[arg] is an object that implements @[lfun::`[]()], that *! function is called with the @[index] argument. *! *! Otherwise, the action depends on the type of @[arg]: *! *! @mixed arg *! @type object
-
*! The non-
static
(i.e. public) symbol named @[index] is
looked
-
*! up in @[arg].
+
*! The non-
protected
(i.e. public) symbol named @[index] is
+
*!
looked
up in @[arg].
*! *! @type int *! The bignum function named @[index] is looked up in @[arg]. *! The bignum functions are the same as those in the @[Gmp.mpz] *! class. *! *! @type string *! The character at index @[index] in @[arg] is returned as an *! integer. The first character in the string is at index *! @expr{0@} and the highest allowed index is therefore
pike.git/src/operators.c:4971:
*! *! @type mapping *! If @[index] exists in @[arg] the corresponding value is *! returned. Otherwise @expr{UNDEFINED@} is returned. *! *! @type multiset *! If @[index] exists in @[arg], @expr{1@} is returned. *! Otherwise @expr{UNDEFINED@} is returned. *! *! @type program
-
*! The non-
static
(i.e. public) constant symbol @[index] is
+
*! The non-
protected
(i.e. public) constant symbol @[index] is
*! looked up in @[arg]. *! *! @endmixed *! *! As a compatibility measure, this function also performs range *! operations if it's called with three arguments. In that case it *! becomes equivalent to: *! *! @code *! @[`[..]] (arg, start, @[Pike.INDEX_FROM_BEG], end, @[Pike.INDEX_FROM_BEG])
pike.git/src/operators.c:5040:
*! This function behaves like @[`[]], except that the index is *! passed literally as a string instead of being evaluated. *! *! @returns *! If @[arg] is an object that implements @[lfun::`->()], that function *! will be called with @[index] as the single argument. *! *! Otherwise the result will be as follows: *! @mixed arg *! @type object
-
*! The non-
static
(ie public) symbol named @[index] will be
looked up
-
*! in @[arg].
+
*! The non-
protected
(ie public) symbol named @[index] will be
+
*!
looked up
in @[arg].
*! @type int *! The bignum function named @[index] will be looked up in @[arg]. *! @type array *! An array of all elements in @[arg] arrow indexed with @[index] *! will be returned. *! @type mapping *! If @[index] exists in @[arg] the corresponding value will be *! returned. Otherwise @expr{UNDEFINED@} will be returned. *! @type multiset *! If @[index] exists in @[arg], @expr{1@} will be returned. *! Otherwise @expr{UNDEFINED@} will be returned. *! @type program
-
*! The non-
static
(ie public) constant symbol @[index] will
be
-
*! looked up in @[arg].
+
*! The non-
protected
(ie public) constant symbol @[index] will
+
*!
be
looked up in @[arg].
*! @endmixed *! *! @note *! In an expression @expr{a->b@}, the symbol @expr{b@} can be any *! token that matches the identifier syntax - keywords are *! disregarded in that context. *! *! @note *! An arrow indexing expression in an lvalue context, i.e. where *! the index is being assigned a new value, uses @[`->=] instead of
pike.git/src/operators.c:5106:
*! *! Every lvalue expression with the @expr{[]@} operator becomes a *! call to this function, i.e. @expr{a[b]=c@} is the same as *! @expr{predef::`[]=(a,b,c)@}. *! *! If @[arg] is an object that implements @[lfun::`[]=()], that function *! will be called with @[index] and @[val] as the arguments. *! *! @mixed arg *! @type object
-
*! The non-
static
(ie public) variable named @[index] will
be looked up
-
*! in @[arg], and assigned @[val].
+
*! The non-
protected
(ie public) variable named @[index] will
+
*!
be looked up
in @[arg], and assigned @[val].
*! @type array|mapping *! Index @[index] in @[arg] will be assigned @[val]. *! @type multiset *! If @[val] is @expr{0@} (zero), one occurrance of @[index] in *! @[arg] will be removed. Otherwise @[index] will be added *! to @[arg] if it is not already there. *! @endmixed *! *! @returns *! @[val] will be returned.
pike.git/src/operators.c:5165:
*! @expr{b@} in string form. *! *! This function behaves like @[`[]=], except that the index is *! passed literally as a string instead of being evaluated. *! *! If @[arg] is an object that implements @[lfun::`->=()], that function *! will be called with @[index] and @[val] as the arguments. *! *! @mixed arg *! @type object
-
*! The non-
static
(ie public) variable named @[index] will
be looked up
-
*! in @[arg], and assigned @[val].
+
*! The non-
protected
(ie public) variable named @[index] will
+
*!
be looked up
in @[arg], and assigned @[val].
*! @type array|mapping *! Index @[index] in @[arg] will be assigned @[val]. *! @type multiset *! If @[val] is @expr{0@} (zero), one occurrance of @[index] in *! @[arg] will be removed. Otherwise @[index] will be added *! to @[arg] if it is not already there. *! @endmixed *! *! @returns *! @[val] will be returned.
pike.git/src/operators.c:5229:
*! The result will be as follows: *! @mixed arg *! @type string *! The number of characters in @[arg] will be returned. *! @type array|multiset *! The number of elements in @[arg] will be returned. *! @type mapping *! The number of key-value pairs in @[arg] will be returned. *! @type object *! If @[arg] implements @[lfun::_sizeof()], that function will
-
*! be called. Otherwise the number of non-
static
(ie public)
+
*! be called. Otherwise the number of non-
protected
(ie public)
*! symbols in @[arg] will be returned. *! @endmixed *! *! @seealso *! @[lfun::_sizeof()] */ PMOD_EXPORT void f_sizeof(INT32 args) { INT32 tmp; if(args<1)