pike.git / lib / modules / Int.pmod

version» Context lines:

pike.git/lib/modules/Int.pmod:29:   //! (@expr{0x7fffffff@}).   //!   //! @note   //! The size of the native integers can be controlled when Pike is   //! compiled with the configure flags @expr{--with-int-int@},   //! @expr{--with-long-int@}, and @expr{--with-long-long-int@}. The   //! default is to use the longest available integer type that fits   //! inside a pointer, which typically means that it's 64 bit on "true"   //! 64 bit architectures.   //! - //! @note - //! If Pike is compiled with the configure flag - //! @expr{--without-bignum@} (which is discouraged), then all - //! arithmetic operations will instead silently wrap around at these - //! limits. +       //! Swaps the upper and lower byte in a word.   //!   //! @seealso   //! @[swap_long()]   int(0..65535) swap_word(int(0..65535) i) {    return ((i&255)<<8) | ((i&(255<<8))>>8);   }      //! Swaps the upper and lower word in a longword, and the upper and
pike.git/lib/modules/Int.pmod:160:    protected mixed ``>>(mixed arg) {    return 0;    }    protected mixed cast(string to) {    switch(to) {    case "string":    return "inf";    case "float":    return Math.inf;    default: -  error("Can not cast to %O.\n", to); +  return UNDEFINED;    }    }    protected string _sprintf(int t) {    return t=='O' && (neg?"-":"")+"Int.inf";    }   }      class NInf {    inherit Inf;    constant neg = 1;   }      protected Inf ninf = NInf();      //! An object that behaves like positive infinity.   Inf inf = Inf();