Skip to content

penf_b_size

PENF bit/byte size functions.

Source: src/lib/penf_b_size.F90

Dependencies

Contents

Interfaces

bit_size

Overloading of the intrinsic bit_size function for computing the number of bits of (also) real and character variables.

Module procedures: bit_size_R8P, bit_size_R4P, bit_size_chr

byte_size

Compute the number of bytes of a variable.

Module procedures: byte_size_I8P, byte_size_I4P, byte_size_I2P, byte_size_I1P, byte_size_R8P, byte_size_R4P, byte_size_chr

Functions

bit_size_R16P

Compute the number of bits of a real variable.

fortran
 use penf
 print FI2P, bit_size(1._R16P)

Attributes: elemental

Returns: integer(kind=I2P)

fortran
function bit_size_R16P(i) result(bits)

Arguments

NameTypeIntentAttributesDescription
ireal(kind=R16P)inReal variable whose number of bits must be computed.

bit_size_R8P

Compute the number of bits of a real variable.

fortran
 use penf
 print FI1P, bit_size(1._R8P)

Attributes: elemental

Returns: integer(kind=I1P)

fortran
function bit_size_R8P(i) result(bits)

Arguments

NameTypeIntentAttributesDescription
ireal(kind=R8P)inReal variable whose number of bits must be computed.

bit_size_R4P

Compute the number of bits of a real variable.

fortran
 use penf
 print FI1P, bit_size(1._R4P)

Attributes: elemental

Returns: integer(kind=I1P)

fortran
function bit_size_R4P(i) result(bits)

Arguments

NameTypeIntentAttributesDescription
ireal(kind=R4P)inReal variable whose number of bits must be computed.

bit_size_chr

Compute the number of bits of a character variable.

fortran
 use penf
 print FI4P, bit_size('ab')

Attributes: elemental

Returns: integer(kind=I4P)

fortran
function bit_size_chr(i) result(bits)

Arguments

NameTypeIntentAttributesDescription
icharacter(len=*)inCharacter variable whose number of bits must be computed.

byte_size_R16P

Compute the number of bytes of a real variable.

fortran
 use penf
 print FI1P, byte_size(1._R16P)

Attributes: elemental

Returns: integer(kind=I1P)

fortran
function byte_size_R16P(i) result(bytes)

Arguments

NameTypeIntentAttributesDescription
ireal(kind=R16P)inReal variable whose number of bytes must be computed.

byte_size_R8P

Compute the number of bytes of a real variable.

fortran
 use penf
 print FI1P, byte_size(1._R8P)

Attributes: elemental

Returns: integer(kind=I1P)

fortran
function byte_size_R8P(i) result(bytes)

Arguments

NameTypeIntentAttributesDescription
ireal(kind=R8P)inReal variable whose number of bytes must be computed.

byte_size_R4P

Compute the number of bytes of a real variable.

fortran
 use penf
 print FI1P, byte_size(1._R4P)

Attributes: elemental

Returns: integer(kind=I1P)

fortran
function byte_size_R4P(i) result(bytes)

Arguments

NameTypeIntentAttributesDescription
ireal(kind=R4P)inReal variable whose number of bytes must be computed.

byte_size_chr

Compute the number of bytes of a character variable.

fortran
 use penf
 print FI1P, byte_size('ab')

Attributes: elemental

Returns: integer(kind=I4P)

fortran
function byte_size_chr(i) result(bytes)

Arguments

NameTypeIntentAttributesDescription
icharacter(len=*)inCharacter variable whose number of bytes must be computed.

byte_size_I8P

Compute the number of bytes of an integer variable.

fortran
 use penf
 print FI1P, byte_size(1_I8P)

Attributes: elemental

Returns: integer(kind=I1P)

fortran
function byte_size_I8P(i) result(bytes)

Arguments

NameTypeIntentAttributesDescription
iinteger(kind=I8P)inInteger variable whose number of bytes must be computed.

byte_size_I4P

Compute the number of bytes of an integer variable.

fortran
 use penf
 print FI1P, byte_size(1_I4P)

Attributes: elemental

Returns: integer(kind=I1P)

fortran
function byte_size_I4P(i) result(bytes)

Arguments

NameTypeIntentAttributesDescription
iinteger(kind=I4P)inInteger variable whose number of bytes must be computed.

byte_size_I2P

Compute the number of bytes of an integer variable.

fortran
 use penf
 print FI1P, byte_size(1_I2P)

Attributes: elemental

Returns: integer(kind=I1P)

fortran
function byte_size_I2P(i) result(bytes)

Arguments

NameTypeIntentAttributesDescription
iinteger(kind=I2P)inInteger variable whose number of bytes must be computed.

byte_size_I1P

Compute the number of bytes of an integer variable.

fortran
 use penf
 print FI1P, byte_size(1_I1P)

Attributes: elemental

Returns: integer(kind=I1P)

fortran
function byte_size_I1P(i) result(bytes)

Arguments

NameTypeIntentAttributesDescription
iinteger(kind=I1P)inInteger variable whose number of bytes must be computed.