XL Fortran for AIX 8.1

Language Reference


Returns the number of bits in an integer type. Because only the type of the argument is examined, the argument need not be defined.

must be of type integer.


Inquiry function

Result Type and Attributes

Scalar integer with the same kind type parameter as I.

Result Value

The result is the number of bits in the integer data type of the argument:

+-------------------------------IBM Extension--------------------------------+

    type                    bits
-----------                ------
 integer(1)                   08
 integer(2)                   16
 integer(4)                   32
 integer(8)                   64

+----------------------------End of IBM Extension----------------------------+

The bits are numbered from 0 to BIT_SIZE(I)-1, from right to left.


BIT_SIZE (1_4) has the value 32, because the integer type with kind 4 (that is, a four-byte integer) contains 32 bits.

[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]