short vs. long

Martin Minow minow at mountn.dec.com
Mon May 22 07:43:01 AEST 1989


In article <19.UUL1.3#5077 at aussie.UUCP> rex at aussie.UUCP (Rex Jaeschke) replies
to a posting that noted that the Draft standard "does not require that the
sizeof short is less than or equal to the sizeof int..."
>
>This is one of those "by a careful reading of the draft" type 
>questions. Page 23 lines 36-43 states that "... the range of values of 
>each type [signed char, short, int, long] is a subrange of the values 
>of the next type in the list."

Not to be picky, but the *range* of a value is not necessarily the same
thing as its storage requirement.  For example, on a Vax computer, float
and double have the same range, but different size (and different precision).

Or, am I reading the standard *too* carefully?

Martin Minow
minow%thundr.dec at decwrl.dec.com

The above does not represent the position of Digital Equipment Corporation.



More information about the Comp.std.c mailing list