byte_size_R4P Function

private elemental function byte_size_R4P(i) result(bytes)

Compute the number of bytes of a real variable.

 use penf
 print FI1P, byte_size(1._R4P)

Arguments

Type IntentOptional Attributes Name
real(kind=R4P), intent(in) :: i

Real variable whose number of bytes must be computed.

Return Value integer(kind=I1P)

Number of bytes of r.


Called by

proc~~byte_size_r4p~~CalledByGraph proc~byte_size_r4p byte_size_R4P interface~byte_size byte_size interface~byte_size->proc~byte_size_r4p program~volatile_doctest~127 volatile_doctest program~volatile_doctest~127->interface~byte_size program~volatile_doctest~156 volatile_doctest program~volatile_doctest~156->interface~byte_size program~volatile_doctest~170 volatile_doctest program~volatile_doctest~170->interface~byte_size program~volatile_doctest~173 volatile_doctest program~volatile_doctest~173->interface~byte_size program~volatile_doctest~18 volatile_doctest program~volatile_doctest~18->interface~byte_size program~volatile_doctest~24 volatile_doctest program~volatile_doctest~24->interface~byte_size program~volatile_doctest~86 volatile_doctest program~volatile_doctest~86->interface~byte_size program~volatile_doctest~96 volatile_doctest program~volatile_doctest~96->interface~byte_size

Source Code

   elemental function byte_size_R4P(i) result(bytes)
   !< Compute the number of bytes of a real variable.
   !<
   !<```fortran
   !< use penf
   !< print FI1P, byte_size(1._R4P)
   !<```
   !=> 4 <<<
   real(R4P), intent(in) :: i     !< Real variable whose number of bytes must be computed.
   integer(I1P)          :: bytes !< Number of bytes of r.

   bytes = bit_size(i) / 8_I1P
   endfunction byte_size_R4P