TRAILZ

9.260 TRAILZ — Number of trailing zero bits of an integer

Description:
TRAILZ returns 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 of I are zero, the result value is BIT_SIZE(I).
Example:
PROGRAM test_trailz
  WRITE (*,*) TRAILZ(8)  ! prints 3
END PROGRAM
See also:
BIT_SIZE, LEADZ, POPPAR, POPCNT

© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-5.4.0/gfortran/TRAILZ.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部