byte_size_I2P Function

private elemental function byte_size_I2P(i) result(bytes)

Compute the number of bytes of an integer variable.

 use penf
 print FI1P, byte_size(1_I2P)

Arguments

Type IntentOptional Attributes Name
integer(kind=I2P), intent(in) :: i

Integer variable whose number of bytes must be computed.

Return Value integer(kind=I1P)

Number of bytes of i.


Called by

proc~~byte_size_i2p~~CalledByGraph proc~byte_size_i2p byte_size_I2P interface~byte_size byte_size interface~byte_size->proc~byte_size_i2p program~volatile_doctest~11 volatile_doctest program~volatile_doctest~11->interface~byte_size program~volatile_doctest~115 volatile_doctest program~volatile_doctest~115->interface~byte_size program~volatile_doctest~163 volatile_doctest program~volatile_doctest~163->interface~byte_size program~volatile_doctest~184 volatile_doctest program~volatile_doctest~184->interface~byte_size program~volatile_doctest~196 volatile_doctest program~volatile_doctest~196->interface~byte_size program~volatile_doctest~21 volatile_doctest program~volatile_doctest~21->interface~byte_size program~volatile_doctest~70 volatile_doctest program~volatile_doctest~70->interface~byte_size program~volatile_doctest~85 volatile_doctest program~volatile_doctest~85->interface~byte_size

Source Code

   elemental function byte_size_I2P(i) result(bytes)
   !< Compute the number of bytes of an integer variable.
   !<
   !<```fortran
   !< use penf
   !< print FI1P, byte_size(1_I2P)
   !<```
   !=> 2 <<<
   integer(I2P), intent(in) :: i     !< Integer variable whose number of bytes must be computed.
   integer(I1P)             :: bytes !< Number of bytes of i.

   bytes = bit_size(i) / 8_I1P
   endfunction byte_size_I2P