@@ -36,11 +36,11 @@ subroutine test_to_string_complex
3636 & " Default formatter for complex number" , partial= .true. )
3737 call check_formatter(to_string((1 , 1 ), ' (F6.2)' ), " ( 1.00, 1.00)" , &
3838 & " Formatter for complex number" )
39- call check_formatter(to_string((- 1 , - 1 ), ' ( F6.2) ' ), " ( -1.00, -1.00)" , &
39+ call check_formatter(to_string((- 1 , - 1 ), ' F6.2' ), " ( -1.00, -1.00)" , &
4040 & " Formatter for negative complex number" )
41- call check_formatter(to_string((1 , 1 ), ' ( SP,F6.2) ' ), " ( +1.00, +1.00)" , &
41+ call check_formatter(to_string((1 , 1 ), ' SP,F6.2' ), " ( +1.00, +1.00)" , &
4242 & " Formatter with sign control descriptor for complex number" )
43- call check_formatter(to_string((1 , 1 ), ' ( F6.2) ' ) // to_string((2 , 2 ), ' (F7.3)' ), &
43+ call check_formatter(to_string((1 , 1 ), ' F6.2' ) // to_string((2 , 2 ), ' (F7.3)' ), &
4444 & " ( 1.00, 1.00)( 2.000, 2.000)" , &
4545 & " Multiple formatters for complex numbers" )
4646
@@ -49,51 +49,51 @@ end subroutine test_to_string_complex
4949 subroutine test_to_string_integer
5050 call check_formatter(to_string(100 ), " 100" , &
5151 & " Default formatter for integer number" )
52- call check_formatter(to_string(100 , ' (I6) ' ), " 100" , &
52+ call check_formatter(to_string(100 , ' I6 ' ), " 100" , &
5353 & " Formatter for integer number" )
54- call check_formatter(to_string(100 , ' ( I0.6) ' ), " 000100" , &
54+ call check_formatter(to_string(100 , ' I0.6' ), " 000100" , &
5555 & " Formatter with zero padding for integer number" )
56- call check_formatter(to_string(100 , ' (I6) ' ) // to_string(1000 , ' (I7)' ), &
56+ call check_formatter(to_string(100 , ' I6 ' ) // to_string(1000 , ' (I7)' ), &
5757 & " 100 1000" , " Multiple formatters for integers" )
58- call check_formatter(to_string(34 , ' (B8) ' ), " 100010" , &
58+ call check_formatter(to_string(34 , ' B8 ' ), " 100010" , &
5959 & " Binary formatter for integer number" )
60- call check_formatter(to_string(34 , ' ( O0.3) ' ), " 042" , &
60+ call check_formatter(to_string(34 , ' O0.3' ), " 042" , &
6161 & " Octal formatter with zero padding for integer number" )
62- call check_formatter(to_string(34 , ' (Z3) ' ), " 22" , &
62+ call check_formatter(to_string(34 , ' Z3 ' ), " 22" , &
6363 & " Hexadecimal formatter for integer number" )
6464
6565 end subroutine test_to_string_integer
6666
6767 subroutine test_to_string_real
6868 call check_formatter(to_string(100 .), " 100.0" , &
6969 & " Default formatter for real number" , partial= .true. )
70- call check_formatter(to_string(100 ., ' ( F6.2) ' ), " 100.00" , &
70+ call check_formatter(to_string(100 ., ' F6.2' ), " 100.00" , &
7171 & " Formatter for real number" )
72- call check_formatter(to_string(289 ., ' ( E7.2) ' ), " .29E+03" , &
72+ call check_formatter(to_string(289 ., ' E7.2' ), " .29E+03" , &
7373 & " Exponential formatter with rounding for real number" )
74- call check_formatter(to_string(128 ., ' ( ES8.2) ' ), " 1.28E+02" , &
74+ call check_formatter(to_string(128 ., ' ES8.2' ), " 1.28E+02" , &
7575 & " Exponential formatter for real number" )
7676
7777 ! Wrong demonstration
78- call check_formatter(to_string(- 100 ., ' ( F6.2) ' ), " *" , &
78+ call check_formatter(to_string(- 100 ., ' F6.2' ), " *" , &
7979 & " Too narrow formatter for signed real number" , partial= .true. )
80- call check_formatter(to_string(1000 ., ' ( F6.3) ' ), " *" , &
80+ call check_formatter(to_string(1000 ., ' F6.3' ), " *" , &
8181 & " Too narrow formatter for real number" , partial= .true. )
82- call check_formatter(to_string(1000 ., ' ( 7.3) ' ), " [*]" , &
82+ call check_formatter(to_string(1000 ., ' 7.3' ), " [*]" , &
8383 & " Invalid formatter for real number" , partial= .true. )
8484
8585 end subroutine test_to_string_real
8686
8787 subroutine test_to_string_logical
8888 call check_formatter(to_string(.true. ), " T" , &
8989 & " Default formatter for logcal value" )
90- call check_formatter(to_string(.true. , ' (L2) ' ), " T" , &
90+ call check_formatter(to_string(.true. , ' L2 ' ), " T" , &
9191 & " Formatter for logical value" )
92- call check_formatter(to_string(.false. , ' (L2) ' ) // to_string(.true. , ' (L5)' ), &
92+ call check_formatter(to_string(.false. , ' L2 ' ) // to_string(.true. , ' (L5)' ), &
9393 & " F T" , " Multiple formatters for logical values" )
9494
9595 ! Wrong demonstration
96- call check_formatter(to_string(.false. , ' (1x) ' ), " [*]" , &
96+ call check_formatter(to_string(.false. , ' 1x ' ), " [*]" , &
9797 & " Invalid formatter for logical value" , partial= .true. )
9898
9999 end subroutine test_to_string_logical
0 commit comments