PENF bit/byte size functions.
Overloading of the intrinsic bit_size function for computing the number of bits of (also) real and character variables.
Compute the number of bits of a real variable.
use penf
print FI1P, bit_size(1._R8P)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R8P), | intent(in) | :: | i |
Real variable whose number of bits must be computed. |
Number of bits of r.
Compute the number of bits of a real variable.
use penf
print FI1P, bit_size(1._R4P)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R4P), | intent(in) | :: | i |
Real variable whose number of bits must be computed. |
Number of bits of r.
Compute the number of bits of a character variable.
use penf
print FI4P, bit_size('ab')
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | i |
Character variable whose number of bits must be computed. |
Number of bits of c.
Compute the number of bytes of a variable.
Compute the number of bytes of an integer variable.
use penf
print FI1P, byte_size(1_I8P)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I8P), | intent(in) | :: | i |
Integer variable whose number of bytes must be computed. |
Number of bytes of i.
Compute the number of bytes of an integer variable.
use penf
print FI1P, byte_size(1_I4P)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I4P), | intent(in) | :: | i |
Integer variable whose number of bytes must be computed. |
Number of bytes of i.
Compute the number of bytes of an integer variable.
use penf
print FI1P, byte_size(1_I2P)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I2P), | intent(in) | :: | i |
Integer variable whose number of bytes must be computed. |
Number of bytes of i.
Compute the number of bytes of an integer variable.
use penf
print FI1P, byte_size(1_I1P)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I1P), | intent(in) | :: | i |
Integer variable whose number of bytes must be computed. |
Number of bytes of i.
Compute the number of bytes of a real variable.
use penf
print FI1P, byte_size(1._R8P)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R8P), | intent(in) | :: | i |
Real variable whose number of bytes must be computed. |
Number of bytes of r.
Compute the number of bytes of a real variable.
use penf
print FI1P, byte_size(1._R4P)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R4P), | intent(in) | :: | i |
Real variable whose number of bytes must be computed. |
Number of bytes of r.
Compute the number of bytes of a character variable.
use penf
print FI1P, byte_size('ab')
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | i |
Character variable whose number of bytes must be computed. |
Number of bytes of c.
Compute the number of bits of a real variable.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R16P), | intent(in) | :: | i |
Real variable whose number of bits must be computed. |
Number of bits of r.
Compute the number of bits of a real variable.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R8P), | intent(in) | :: | i |
Real variable whose number of bits must be computed. |
Number of bits of r.
Compute the number of bits of a real variable.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R4P), | intent(in) | :: | i |
Real variable whose number of bits must be computed. |
Number of bits of r.
Compute the number of bits of a character variable.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | i |
Character variable whose number of bits must be computed. |
Number of bits of c.
Compute the number of bytes of a real variable.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R16P), | intent(in) | :: | i |
Real variable whose number of bytes must be computed. |
Number of bytes of r.
Compute the number of bytes of a real variable.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R8P), | intent(in) | :: | i |
Real variable whose number of bytes must be computed. |
Number of bytes of r.
Compute the number of bytes of a real variable.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R4P), | intent(in) | :: | i |
Real variable whose number of bytes must be computed. |
Number of bytes of r.
Compute the number of bytes of a character variable.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | i |
Character variable whose number of bytes must be computed. |
Number of bytes of c.
Compute the number of bytes of an integer variable.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I8P), | intent(in) | :: | i |
Integer variable whose number of bytes must be computed. |
Number of bytes of i.
Compute the number of bytes of an integer variable.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I4P), | intent(in) | :: | i |
Integer variable whose number of bytes must be computed. |
Number of bytes of i.
Compute the number of bytes of an integer variable.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I2P), | intent(in) | :: | i |
Integer variable whose number of bytes must be computed. |
Number of bytes of i.
Compute the number of bytes of an integer variable.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I1P), | intent(in) | :: | i |
Integer variable whose number of bytes must be computed. |
Number of bytes of i.