On Thu, Oct 21, 2004 at 07:02:51PM -0600, Neil Carlson wrote:
> And so, IBITS(I,POS,LEN) is legal when I is an 8-byte integer and POS
> and LEN 4-byte integers? (I'm arguing with a particularly obstinate
> compiler vendor who claims otherwise.)
Yes. The vendor is confusing IBITS with functions like MAX which
explicitly have to have the same types for all the arguments (although
many compilers have an extension which allows them to be different.)
5 13.7.69 MAX (A1, A2 [, A3, ...])
6 Description. Maximum value.
7 Class. Elemental function.
8 Arguments. The arguments shall all have the same type which shall be integer, real, or
9 character and they shall all have the same kind type parameter.
In contrast, IBITS is:
20 13.7.48 IBITS (I, POS, LEN)
21 Description. Extracts a sequence of bits.
22 Class. Elemental function.
23 Arguments.
24 I shall be of type integer.
POS shall be of type integer. It shall be nonnegative and POS + LEN shall be
25 less than or equal to BIT SIZE (I).
26 LEN shall be of type integer and nonnegative.
27 Result Characteristics. Same as I.
|