Utility procedures for C interoperability.
Converts unsigned integer to signed integer.
Converts unsigned 2-byte integer to signed 4-byte integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=u2), | intent(in) | :: | u |
Unsigned integer. |
Signed integer.
Converts unsigned 4-byte integer to signed 8-byte integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=u4), | intent(in) | :: | u |
Unsigned integer. |
Signed integer.
Converts signed integer to unsigned integer.
Converts signed 4-byte integer to unsigned 2-byte integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i4), | intent(in) | :: | s |
Signed integer. |
Unsigned integer.
Converts signed 8-byte integer to unsigned 4-byte integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i8), | intent(in) | :: | s |
Signed integer. |
Unsigned integer.
Converts C logical value to Fortran representation.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=c_int), | intent(in) | :: | c |
Converts Fortran logical value to C representation.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | f |
Returns trimmed string
with appended null-termination.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | f |
Fortran string. |
Null-terminated string.
Converts signed 4-byte integer to unsigned 2-byte integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i4), | intent(in) | :: | s |
Signed integer. |
Unsigned integer.
Converts signed 8-byte integer to unsigned 4-byte integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i8), | intent(in) | :: | s |
Signed integer. |
Unsigned integer.
Converts unsigned 2-byte integer to signed 4-byte integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=u2), | intent(in) | :: | u |
Unsigned integer. |
Signed integer.
Converts unsigned 4-byte integer to signed 8-byte integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=u4), | intent(in) | :: | u |
Unsigned integer. |
Signed integer.
Copies a C string, passed as a C char array, to a Fortran string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=c_char, len=1), | intent(inout) | :: | c(:) |
C char array. |
||
character(len=size), | intent(out) | :: | f |
Fortran string. |
Copies a C string, passed as a C pointer, to a Fortran string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(c_ptr), | intent(in) | :: | c |
C string pointer. |
||
character(len=:), | intent(out), | allocatable | :: | f |
Fortran string. |