I was using the zext()
function with Sun Studio Fortan compiler, to transform integer(kind=1)
to integer(kind=4)
, in order to be able to manipulate bits with ibits()
function.
eg :
! Accessing the most significant bit of a byte status
integer(kind=1) :: status
integer :: msb
msb = ibits (zext (status), 7, 1)
It seems that this function is not part of gfortran compiler.
Is there an equivalent function available in gfortran ?