5 CHARACTER (len
=*) MY_STRING(1:3), my_string_s
6 PARAMETER ( MY_STRING
= (/ "A" , "B", "C" /) )
7 PARAMETER ( MY_STRING_S
= "AB C" )
8 character(len
=*), parameter :: str(2) = [ 'Ac','cc']
9 character(len
=*), parameter :: str_s
= 'Acc'
11 CHARACTER (kind
=1,len
=*) MY_STRING1(1:3), my_string_s1
12 PARAMETER ( MY_STRING1
= (/ "A" , "B", "C" /) )
13 PARAMETER ( MY_STRING_S1
= "AB C" )
14 character(kind
=1,len
=*), parameter :: str1(2) = [ 1_
'Ac',1_
'cc']
15 character(kind
=1,len
=*), parameter :: str_s1
= 'Acc'
17 CHARACTER (kind
=4,len
=*) MY_STRING4(1:3), my_string_s4
18 PARAMETER ( MY_STRING4
= (/ 4_
"A" , 4_
"B", 4_
"C" /) )
19 PARAMETER ( MY_STRING_S4
= 4_
"AB C" )
20 character(kind
=4,len
=*), parameter :: str4(2) = [ 4_
'Ac',4_
'cc']
21 character(kind
=4,len
=*), parameter :: str_s4
= 4_
'Acc'
23 if(len(MY_STRING
) /= 1) call abort()
24 if( MY_STRING(1) /= "A" &
25 .or
.MY_STRING(2) /= "B" &
26 .or
.MY_STRING(3) /= "C") call abort()
27 if(len(MY_STRING_s
) /= 4) call abort()
28 if(MY_STRING_S
/= "AB C") call abort()
29 if(len(str
) /= 2) call abort()
30 if(str(1) /= "Ac" .or
. str(2) /= "cc") call abort()
31 if(len(str_s
) /= 3) call abort()
32 if(str_s
/= 'Acc') call abort()
34 if(len(MY_STRING1
) /= 1) call abort()
35 if( MY_STRING1(1) /= 1_
"A" &
36 .or
.MY_STRING1(2) /= 1_
"B" &
37 .or
.MY_STRING1(3) /= 1_
"C") call abort()
38 if(len(MY_STRING_s1
) /= 4) call abort()
39 if(MY_STRING_S1
/= 1_
"AB C") call abort()
40 if(len(str1
) /= 2) call abort()
41 if(str1(1) /= 1_
"Ac" .or
. str1(2) /= 1_
"cc") call abort()
42 if(len(str_s1
) /= 3) call abort()
43 if(str_s1
/= 1_
'Acc') call abort()
45 if(len(MY_STRING4
) /= 1) call abort()
46 if( MY_STRING4(1) /= 4_
"A" &
47 .or
.MY_STRING4(2) /= 4_
"B" &
48 .or
.MY_STRING4(3) /= 4_
"C") call abort()
49 if(len(MY_STRING_s4
) /= 4) call abort()
50 if(MY_STRING_S4
/= 4_
"AB C") call abort()
51 if(len(str4
) /= 2) call abort()
52 if(str4(1) /= 4_
"Ac" .or
. str4(2) /= 4_
"cc") call abort()
53 if(len(str_s4
) /= 3) call abort()
54 if(str_s4
/= 4_
'Acc') call abort()