Pascal not considered harmful - was Re: Rich kids are into COBOL

Mouse mouse at Rodents-Montreal.ORG
Sat Feb 21 14:00:47 CST 2015


>> And the minumum ranges are:
>> 	signed short	       -32,767 ..        32,767
>> 	signed int	       -32,767 ..        32,767
> 16 bit 2's complement goes from -32768 ... 32767
> does the ANSI standard leave off the -32768?

C99 does, at least according to the very late draft I have (this
textification loses supserscripting; the "215" is 2^15, etc):

       5.2.4.2.1  Sizes of integer types <limits.h>
...
                    Their implementation-defined  values  shall  be
       equal  or  greater  in  magnitude  (absolute value) to those
       shown, with the same sign.
...
         -- minimum value for an object of type short int
            SHRT_MIN                    -32767 // -(215-1)
...
         -- minimum value for an object of type int
            INT_MIN                     -32767 // -(215-1)
...
         -- minimum value for an object of type long int
            LONG_MIN               -2147483647 // -(231-1)
...
         -- minimum value for an object of type long long int
            LLONG_MIN     -9223372036854775807 // -(263-1)

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse at rodents-montreal.org
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


More information about the cctalk mailing list