byte_size_chr Function

private elemental function byte_size_chr(i) result(bytes)

Arguments

TypeIntentOptionalAttributesName
character, intent(in) :: i

Return Value integer(kind=I4P)


Called by

proc~~byte_size_chr~5~~CalledByGraph proc~byte_size_chr~5 byte_size_chr interface~byte_size~5 byte_size interface~byte_size~5->proc~byte_size_chr~5

Contents

Source Code


Source Code

   elemental function byte_size_chr(i) result(bytes)
   !< Compute the number of bytes of a character variable.
   !<
   !<```fortran
   !< use penf
   !< print FI1P, byte_size('ab')
   !<```
   !=> 2 <<<
   character(*), intent(in) :: i     !< Character variable whose number of bytes must be computed.
   integer(I4P)             :: bytes !< Number of bytes of c.

   bytes = bit_size(i) / 8_I4P
   endfunction byte_size_chr