Next: TRANSFER, Previous: TINY, Up: Intrinsic Procedures [Contents][Index]
9.273 TRAILZ — Number of trailing zero bits of an integer
- Description:
TRAILZreturns the number of trailing zero bits of an integer.- Standard:
Fortran 2008 and later
- Class:
Elemental function
- Syntax:
RESULT = TRAILZ(I)- Arguments:
I Shall be of type INTEGER.- Return value:
The type of the return value is the default
INTEGER. If all the bits ofIare zero, the result value isBIT_SIZE(I).- Example:
PROGRAM test_trailz WRITE (*,*) TRAILZ(8) ! prints 3 END PROGRAM
- See also:
