str_ascii_default Function

private pure function str_ascii_default(input) result(output)

Convert string of default kind to ASCII string.

 use penf
 character(len=:, kind=ASCII), allocatable :: string
 string = str_ascii('I was DEFAULT kind, but now I am ASCII')
 print "(A)", string

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: input

Input string of default kind.

Return Value character(kind=ASCII, len=:), allocatable

Output string of ASCII kind.


Called by

proc~~str_ascii_default~~CalledByGraph proc~str_ascii_default str_ascii_default interface~str_ascii str_ascii interface~str_ascii->proc~str_ascii_default program~volatile_doctest~116 volatile_doctest program~volatile_doctest~116->interface~str_ascii program~volatile_doctest~150 volatile_doctest program~volatile_doctest~150->interface~str_ascii program~volatile_doctest~162 volatile_doctest program~volatile_doctest~162->interface~str_ascii program~volatile_doctest~57 volatile_doctest program~volatile_doctest~57->interface~str_ascii program~volatile_doctest~64 volatile_doctest program~volatile_doctest~64->interface~str_ascii program~volatile_doctest~73 volatile_doctest program~volatile_doctest~73->interface~str_ascii

Source Code

   pure function str_ascii_default(input) result(output)
   !< Convert string of default kind to ASCII string.
   !<
   !<```fortran
   !< use penf
   !< character(len=:, kind=ASCII), allocatable :: string
   !< string = str_ascii('I was DEFAULT kind, but now I am ASCII')
   !< print "(A)", string
   !<```
   !=> I was DEFAULT kind, but now I am ASCII <<<
   character(len=*), intent(in)              :: input  !< Input string of default kind.
   character(len=:, kind=ASCII), allocatable :: output !< Output string of ASCII kind.

   output = input
   endfunction str_ascii_default