TRAILZ

Elemental Intrinsic Function (Generic): Returns the number of trailing zero bits in an integer.

構文

result = TRAILZ (i)

i

(Input) Must be of type integer or logical.

Results

The result type and kind is the same as i. The result value is the number of trailing zeros in the binary representation of the integer i.

The model for the interpretation of an integer value as a sequence of bits is shown in Model for Bit Data.

Consider the following:

  INTEGER*8 J, TWO
  PARAMETER (TWO=2)
  DO J= -1, 40
    TYPE *, TRAILZ(TWO**J)  ! Prints 64, then 0 up to
  ENDDO                     !   40 (trailing zeros)
  END

このヘルプトピックについてのフィードバックを送信

© 1996-2011 Intel Corporation. 無断での引用、転載を禁じます。