converts a variable of type (int32, int64, sp, dp, char, logical) to a “string” which is just a collecting of chars.
Usage result = to_string(variable)
Note
the functions here are not elemental so they won’t work for arrays. Please use pic_print_array_v2 module for this
transform an int32 to a string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | i |
transform an int64 to a string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | i |
transform a real(sp) to a string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | r |
transform a real(dp) to a string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | r |
transform a character to a string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | c |
tranform a logical to a string either true or false
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | l |