pike.git / src / operators.c

version» Context lines:

pike.git/src/operators.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h"   #include <math.h> - RCSID("$Id: operators.c,v 1.128 2001/02/26 21:46:15 grubba Exp $"); + RCSID("$Id: operators.c,v 1.129 2001/03/04 19:27:18 mirar 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:3315:    *! String index operator.    */   static void f_string_assignment_index(INT32 args)   {    INT_TYPE i;    get_all_args("string[]",args,"%i",&i);    if(i<0) i+=THIS->s->len;    if(i<0)    i+=THIS->s->len;    if(i<0 || i>=THIS->s->len) -  Pike_error("Index %d is out of range 0 - %ld.\n", +  Pike_error("Index %"PRINTPIKEINT"d is out of range 0 - %ld.\n",    i, PTRDIFF_T_TO_LONG(THIS->s->len - 1));    else    i=index_shared_string(THIS->s,i);    pop_n_elems(args);    push_int(i);   }      /*! @decl int `[]=(int i, int j)    *!    *! String assign index operator.