Type conversion functions and other utility procedures.
Returns whether array contains an integer value.
Returns .true.
if the integer array contains the given value.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i4), | intent(inout) | :: | array(:) |
Input array. |
||
integer(kind=i4), | intent(in) | :: | value |
Value to search. |
Returns .true.
if the integer array contains the given value.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i8), | intent(inout) | :: | array(:) |
Input array. |
||
integer(kind=i8), | intent(in) | :: | value |
Value to search. |
Returns whether two real numbers are approximately the same.
Returns .true.
if the 4-byte real numbers a
and b
are
approximately the same, else .false.
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r4), | intent(in) | :: | a | |||
real(kind=r4), | intent(in) | :: | b |
Returns .true.
if the 8-byte real numbers a
and b
are
approximately the same, else .false.
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in) | :: | a | |||
real(kind=r8), | intent(in) | :: | b |
Returns increased integer value.
Increases argument a
by 1 or b
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i4), | intent(in) | :: | a |
Value to increase. |
||
integer(kind=i4), | intent(in), | optional | :: | b |
Summand to use. |
Increases argument a
by 1 or b
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i8), | intent(in) | :: | a |
Value to increase. |
||
integer(kind=i8), | intent(in), | optional | :: | b |
Summand to use. |
Generic integer to string converter.
Converts 4-byte integer to allocatable string of length > 0.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | i |
Value. |
String of value.
Converts 8-byte integer to allocatable string of length > 0.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i8), | intent(in) | :: | i |
Value. |
String of value.
Generic real to string converter.
Converts 4-byte real to allocatable string of length > 1.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r4), | intent(in) | :: | f |
Value. |
String of value.
Converts 8-byte real to allocatable string of length > 1.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in) | :: | f |
Value. |
String of value.
Converts 8-byte real to type (for response values).
Converts 8-byte real to 4-byte integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in) | :: | f |
8-byte real value. |
||
integer(kind=i4), | intent(out) | :: | i |
4-byte integer value. |
Converts 8-byte real to 8-byte integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in) | :: | f |
8-byte real value. |
||
integer(kind=i8), | intent(out) | :: | i |
8-byte integer value. |
Converts 8-byte real to logical. If f
equals 0.0
, the result is
.false.
, else .true.
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in) | :: | f |
8-byte real value. |
||
logical, | intent(out) | :: | l |
Logical value. |
Converts 8-byte real to 4-byte real
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in) | :: | f |
8-byte real value. |
||
real(kind=r4), | intent(out) | :: | r |
4-byte real value. |
Converts type to 8-byte real (for response values).
Converts 4-byte integer to 8-byte real.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i4), | intent(in) | :: | i |
4-byte integer value. |
Value as 8-byte real.
Converts 8-byte integer to 8-byte real.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i8), | intent(in) | :: | i |
8-byte integer value. |
Value as 8-byte real.
Converts logical to 8-byte real (0.0
for .false.
and 1.0
for .true.
).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | l |
Logical value. |
Value as 8-byte real.
Converts 4-byte real to 8-byte real.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r4), | intent(in) | :: | f |
4-byte real value. |
Value as 8-byte real.
Converts string to 8-byte real.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | str |
Number string. |
Value.
Converts string to 4-byte integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | str |
Number string. |
Value.
Returns either argument true
or false
as allocatable character,
depending on the value of logical value l
. The result is trimmed.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | l |
Logical value. |
||
character(len=*), | intent(in) | :: | true |
Return value on |
||
character(len=*), | intent(in) | :: | false |
Return value on |
Returned string.
Converts logical (boolean) to 4-byte integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | l |
Logical value. |
0
or 1
.
Converts angle from degrees to gon.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in) | :: | a |
Angle [deg]. |
Angle [gon].
Converts angle from degrees to radiants.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in) | :: | a |
Angle [deg]. |
Angle [rad].
Converts angle from gon to degrees.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in) | :: | a |
Angle [gon]. |
Angle [deg].
Converts angle from gon to radiants.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in) | :: | a |
Angle [gon]. |
Angle [rad].
Converts angle from radiants to degrees.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in) | :: | a |
Angle [rad]. |
Angle [deg]
Converts angle from radiants to gon.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in) | :: | a |
Angle [rad]. |
Angle [gon]
Converts 4-byte integer to 8-byte real.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i4), | intent(in) | :: | i |
4-byte integer value. |
Value as 8-byte real.
Converts 8-byte integer to 8-byte real.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i8), | intent(in) | :: | i |
8-byte integer value. |
Value as 8-byte real.
Converts logical to 8-byte real (0.0
for .false.
and 1.0
for .true.
).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | l |
Logical value. |
Value as 8-byte real.
Converts 4-byte real to 8-byte real.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r4), | intent(in) | :: | f |
4-byte real value. |
Value as 8-byte real.
Pauses program execution for given time in mseconds.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | sec |
Delay in seconds [msec]. |
Pauses program execution for given time in seconds.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | sec |
Delay in seconds [sec]. |
Pauses program execution for given time in useconds.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | usec |
Delay in useconds [usec]. |
Converts 8-byte real to 4-byte integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in) | :: | f |
8-byte real value. |
||
integer(kind=i4), | intent(out) | :: | i |
4-byte integer value. |
Converts 8-byte real to 8-byte integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in) | :: | f |
8-byte real value. |
||
integer(kind=i8), | intent(out) | :: | i |
8-byte integer value. |
Converts 8-byte real to logical. If f
equals 0.0
, the result is
.false.
, else .true.
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in) | :: | f |
8-byte real value. |
||
logical, | intent(out) | :: | l |
Logical value. |
Converts 8-byte real to 4-byte real
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in) | :: | f |
8-byte real value. |
||
real(kind=r4), | intent(out) | :: | r |
4-byte real value. |