[UP]


Manual Reference Pages  - trailz (3)

NAME

trailz(3f) - [FORTRAN:INTRINSIC:BIT INQUIRY] Number of trailing zero bits of an integer

CONTENTS

Syntax
Description
Arguments
Return Value
Example
Standard
Class
See Also

SYNTAX

result = trailz(i)

DESCRIPTION

TRAILZ returns the number of trailing zero bits of an integer.

ARGUMENTS

I - Shall be of type INTEGER.

RETURN VALUE

The type of the return value is the default INTEGER. If all the bits of I are zero, the result value is bit_size(i).

EXAMPLE

Sample program:

    program demo_trailz
      write (*,*) trailz(8)  ! prints 3
    end program demo_trailz

STANDARD

[[Fortran 2008]] and later

CLASS

[[Elemental function]]

SEE ALSO

[[bit_size]], [[popcnt]], [[poppar]], [[leadz]]


trailz (3) March 19, 2019
Generated by manServer 1.08 from dc85e170-d7af-4ed7-b2b8-3bebe17f392e using man macros.