couple(3f) - [M_strings:ARRAY] converts between CHARACTER scalar and array of single characters (LICENSE:PD)
Synopsis
Description
Examples
See Also
Author
License
pure function couple(array) result (string)
character(len=1),intent(in) :: array(:) character(len=SIZE(array)) :: string
COUPLE(3f): function that switches an array of single characters to a CHARACTER string.
Sample program:
program demo_couple use M_strings, only : couple character(len=:),allocatable :: array(:) array=[T,h,i,s, ,i,s, ,a, ,s,t,r,i,n,g]Results:! show the array write(*,(1x,*("[",a,"]":))) array ! show the string write(*,(1x,*("[",a,"]":))) couple(array)
end program demo_couple
> [T][h][i][s][ ][i][s][ ][a][ ][s][t][r][i][n][g] > [This is a string]
switch(3), join(3), uncouple(3), c2s(3), s2c(3)
John S. Urban
Public Domain
