Convert logical to string.
use penf
print "(A)", str(n=.true.)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | n |
Logical to be converted. |
Returned string containing input number plus padding zeros.
elemental function str_bol(n) result(str) !< Convert logical to string. !< !<```fortran !< use penf !< print "(A)", str(n=.true.) !<``` !=> T <<< logical, intent(in):: n !< Logical to be converted. character(1):: str !< Returned string containing input number plus padding zeros. write(str, '(L1)') n endfunction str_bol