Skip to content

Commit 546fece

Browse files
committed
Revert e670262
Change from pure to elemental requires extra discussion, therefore inclusion of this patch is deferred.
1 parent e670262 commit 546fece

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

doc/specs/stdlib_ascii.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Converts input character variable to all lowercase.
3838

3939
#### Class
4040

41-
Elemental function.
41+
Pure function.
4242

4343
#### Argument
4444

@@ -74,7 +74,7 @@ Converts input character variable to all uppercase.
7474

7575
#### Class
7676

77-
Elemental function.
77+
Pure function.
7878

7979
#### Argument
8080

@@ -112,7 +112,7 @@ The rest of the character sequence is transformed to lowercase.
112112

113113
#### Class
114114

115-
Elemental function.
115+
Pure function.
116116

117117
#### Argument
118118

@@ -150,7 +150,7 @@ Reverses the order of all characters in the input character type.
150150

151151
#### Class
152152

153-
Elemental function.
153+
Pure function.
154154

155155
#### Argument
156156

src/stdlib_ascii.f90

+4-4
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ end function char_to_upper
213213
!> Convert character variable to lower case
214214
!>
215215
!> Version: experimental
216-
elemental function to_lower(string) result(lower_string)
216+
pure function to_lower(string) result(lower_string)
217217
character(len=*), intent(in) :: string
218218
character(len=len(string)) :: lower_string
219219
integer :: i
@@ -227,7 +227,7 @@ end function to_lower
227227
!> Convert character variable to upper case
228228
!>
229229
!> Version: experimental
230-
elemental function to_upper(string) result(upper_string)
230+
pure function to_upper(string) result(upper_string)
231231
character(len=*), intent(in) :: string
232232
character(len=len(string)) :: upper_string
233233
integer :: i
@@ -241,7 +241,7 @@ end function to_upper
241241
!> Convert character variable to title case
242242
!>
243243
!> Version: experimental
244-
elemental function to_title(string) result(title_string)
244+
pure function to_title(string) result(title_string)
245245
character(len=*), intent(in) :: string
246246
character(len=len(string)) :: title_string
247247
integer :: i, n
@@ -266,7 +266,7 @@ end function to_title
266266
!> Reverse the character order in the input character variable
267267
!>
268268
!> Version: experimental
269-
elemental function reverse(string) result(reverse_string)
269+
pure function reverse(string) result(reverse_string)
270270
character(len=*), intent(in) :: string
271271
character(len=len(string)) :: reverse_string
272272
integer :: i, n

src/tests/ascii/test_ascii.f90

-8
Original file line numberDiff line numberDiff line change
@@ -559,8 +559,6 @@ subroutine test_to_lower_string
559559

560560
dlc = to_lower("0123456789ABCDE")
561561
call check(dlc == "0123456789abcde")
562-
563-
call check(all(to_lower(["ABC", "DEF"]) == ["abc", "def"]))
564562
end subroutine test_to_lower_string
565563

566564
subroutine test_to_upper_string
@@ -577,8 +575,6 @@ subroutine test_to_upper_string
577575

578576
dlc = to_upper("0123456789abcde")
579577
call check(dlc == "0123456789ABCDE")
580-
581-
call check(all(to_upper(["abc", "def"]) == ["ABC", "DEF"]))
582578
end subroutine test_to_upper_string
583579

584580
subroutine test_to_title_string
@@ -601,8 +597,6 @@ subroutine test_to_title_string
601597

602598
dlc = to_title("""quOTed""")
603599
call check(dlc == """Quoted""")
604-
605-
call check(all(to_title(["abc", "def"]) == ["Abc", "Def"]))
606600
end subroutine test_to_title_string
607601

608602
subroutine test_reverse_string
@@ -617,8 +611,6 @@ subroutine test_reverse_string
617611
call check(len_trim(dlc) == 32)
618612
call check(trim(dlc) == " desrever")
619613
call check(trim(adjustl(dlc)) == "desrever")
620-
621-
call check(all(reverse(["abc", "def"]) == ["cba", "fed"]))
622614
end subroutine test_reverse_string
623615

624616
end program test_ascii

0 commit comments

Comments
 (0)