@@ -752,38 +752,38 @@ subroutine test_ascii_table(error)
752
752
type :: list
753
753
character (1 ), allocatable :: chars(:)
754
754
end type
755
- type (list) :: tests (15 )
756
-
757
- tests (1 )% chars = [(achar (j),j= 0 ,8 )] ! control codes
758
- tests (2 )% chars = [(achar (j),j= 9 ,9 )] ! tab
759
- tests (3 )% chars = [(achar (j),j= 10 ,13 )] ! whitespaces
760
- tests (4 )% chars = [(achar (j),j= 14 ,31 )] ! control codes
761
- tests (5 )% chars = [(achar (j),j= 32 ,32 )] ! space
762
- tests (6 )% chars = [(achar (j),j= 33 ,47 )] ! !"#$%&'()*+,-./
763
- tests (7 )% chars = [(achar (j),j= 48 ,57 )] ! 0123456789
764
- tests (8 )% chars = [(achar (j),j= 58 ,64 )] ! :;<=>?@
765
- tests (9 )% chars = [(achar (j),j= 65 ,70 )] ! ABCDEF
766
- tests (10 )% chars = [(achar (j),j= 71 ,90 )] ! GHIJKLMNOPQRSTUVWXYZ
767
- tests (11 )% chars = [(achar (j),j= 91 ,96 )] ! [\]^_`
768
- tests (12 )% chars = [(achar (j),j= 97 ,102 )] ! abcdef
769
- tests (13 )% chars = [(achar (j),j= 103 ,122 )]! ghijklmnopqrstuvwxyz
770
- tests (14 )% chars = [(achar (j),j= 123 ,126 )]! {|}~
771
- tests (15 )% chars = [(achar (j),j= 127 ,127 )]! backspace character
755
+ type (list) :: ascii_codes (15 )
756
+
757
+ ascii_codes (1 )% chars = [(achar (j),j= 0 ,8 )] ! control codes
758
+ ascii_codes (2 )% chars = [(achar (j),j= 9 ,9 )] ! tab
759
+ ascii_codes (3 )% chars = [(achar (j),j= 10 ,13 )] ! whitespaces
760
+ ascii_codes (4 )% chars = [(achar (j),j= 14 ,31 )] ! control codes
761
+ ascii_codes (5 )% chars = [(achar (j),j= 32 ,32 )] ! space
762
+ ascii_codes (6 )% chars = [(achar (j),j= 33 ,47 )] ! !"#$%&'()*+,-./
763
+ ascii_codes (7 )% chars = [(achar (j),j= 48 ,57 )] ! 0123456789
764
+ ascii_codes (8 )% chars = [(achar (j),j= 58 ,64 )] ! :;<=>?@
765
+ ascii_codes (9 )% chars = [(achar (j),j= 65 ,70 )] ! ABCDEF
766
+ ascii_codes (10 )% chars = [(achar (j),j= 71 ,90 )] ! GHIJKLMNOPQRSTUVWXYZ
767
+ ascii_codes (11 )% chars = [(achar (j),j= 91 ,96 )] ! [\]^_`
768
+ ascii_codes (12 )% chars = [(achar (j),j= 97 ,102 )] ! abcdef
769
+ ascii_codes (13 )% chars = [(achar (j),j= 103 ,122 )]! ghijklmnopqrstuvwxyz
770
+ ascii_codes (14 )% chars = [(achar (j),j= 123 ,126 )]! {|}~
771
+ ascii_codes (15 )% chars = [(achar (j),j= 127 ,127 )]! backspace character
772
772
773
773
! loop through functions
774
774
do i = 1 , 15
775
- table(i,1 ) = all (is_control(tests (i)% chars))
776
- table(i,2 ) = all (is_printable(tests (i)% chars))
777
- table(i,3 ) = all (is_white(tests (i)% chars))
778
- table(i,4 ) = all (is_blank(tests (i)% chars))
779
- table(i,5 ) = all (is_graphical(tests (i)% chars))
780
- table(i,6 ) = all (is_punctuation(tests (i)% chars))
781
- table(i,7 ) = all (is_alphanum(tests (i)% chars))
782
- table(i,8 ) = all (is_alpha(tests (i)% chars))
783
- table(i,9 ) = all (is_upper(tests (i)% chars))
784
- table(i,10 ) = all (is_lower(tests (i)% chars))
785
- table(i,11 ) = all (is_digit(tests (i)% chars))
786
- table(i,12 ) = all (is_hex_digit(tests (i)% chars))
775
+ table(i,1 ) = all (is_control(ascii_codes (i)% chars))
776
+ table(i,2 ) = all (is_printable(ascii_codes (i)% chars))
777
+ table(i,3 ) = all (is_white(ascii_codes (i)% chars))
778
+ table(i,4 ) = all (is_blank(ascii_codes (i)% chars))
779
+ table(i,5 ) = all (is_graphical(ascii_codes (i)% chars))
780
+ table(i,6 ) = all (is_punctuation(ascii_codes (i)% chars))
781
+ table(i,7 ) = all (is_alphanum(ascii_codes (i)% chars))
782
+ table(i,8 ) = all (is_alpha(ascii_codes (i)% chars))
783
+ table(i,9 ) = all (is_upper(ascii_codes (i)% chars))
784
+ table(i,10 ) = all (is_lower(ascii_codes (i)% chars))
785
+ table(i,11 ) = all (is_digit(ascii_codes (i)% chars))
786
+ table(i,12 ) = all (is_hex_digit(ascii_codes (i)% chars))
787
787
end do
788
788
789
789
call check(error, all (table .eqv. ascii_class_table), " ascii table was not accurately generated" )
0 commit comments