Diff for /parser3/src/classes/void.C between versions 1.39 and 1.40

version 1.39, 2008/06/26 15:00:42 version 1.40, 2008/07/18 08:24:35
Line 44  static void _length(Request& r, MethodPa Line 44  static void _length(Request& r, MethodPa
 static void _pos(Request& r, MethodParams& params) {  static void _pos(Request& r, MethodParams& params) {
         // just checking for consistency          // just checking for consistency
         params.as_no_junction(0, "substr must not be code");          params.as_no_junction(0, "substr must not be code");
           if(params.count()>1){
                   ssize_t offset=params.as_int(1, "n must be int", r);
                   if(offset<0)
                           throw Exception(PARSER_RUNTIME,
                                   0, 
                                   "n(%d) must be >=0", offset);
           }
         // never found          // never found
         r.write_no_lang(*new VInt(-1));          r.write_no_lang(*new VInt(-1));
 }  }
Line 167  MVoid::MVoid(): Methoded("void") { Line 174  MVoid::MVoid(): Methoded("void") {
         add_native_method("length", Method::CT_DYNAMIC, _length, 0, 0);          add_native_method("length", Method::CT_DYNAMIC, _length, 0, 0);
   
         // ^void.pos[substr]          // ^void.pos[substr]
         add_native_method("pos", Method::CT_DYNAMIC, _pos, 1, 1);          add_native_method("pos", Method::CT_DYNAMIC, _pos, 1, 2);
   
         // ^void.int[]          // ^void.int[]
         // ^void.int(default)          // ^void.int(default)

Removed from v.1.39  
changed lines
  Added in v.1.40


E-mail: