Next: LEN, Previous: LBOUND, Up: Intrinsic Procedures
LEADZ
— Number of leading zero bits of an integerLEADZ
returns the number of leading zero bits of an integer.
RESULT = LEADZ(I)
I | Shall be of type INTEGER .
|
INTEGER
.
If all the bits of I
are zero, the result value is BIT_SIZE(I)
.
PROGRAM test_leadz WRITE (*,*) LEADZ(1) ! prints 8 if BITSIZE(I) has the value 32 END PROGRAM