@@ -223,11 +223,11 @@ contains
223
223
pure function char_to_lower (c ) result(t)
224
224
character (len= 1 ), intent (in ) :: c !! A character .
225
225
character (len= 1 ) :: t
226
- integer , parameter :: wp= 32 , la = 65 , lz = 90
226
+ integer , parameter :: wp= 32 , BA = iachar ( ' A ' ), BZ = iachar ( ' Z ' )
227
227
integer :: k
228
-
228
+ !Check whether the integer equivalent is between BA = 65 and BZ = 90
229
229
k = ichar (c)
230
- if (k>= la .and. k<= lz ) k = k + wp
230
+ if (k>= BA .and. k<= BZ ) k = k + wp
231
231
t = char (k)
232
232
233
233
end function char_to_lower
@@ -237,11 +237,11 @@ contains
237
237
pure function char_to_upper (c ) result(t)
238
238
character (len= 1 ), intent (in ) :: c !! A character .
239
239
character (len= 1 ) :: t
240
- integer , parameter :: wp= 32 , BA = 97 , BZ = 122
240
+ integer , parameter :: wp= 32 , la = iachar ( ' a ' ), lz = iachar ( ' z ' )
241
241
integer :: k
242
-
242
+ !Check whether the integer equivalent is between la = 97 and lz = 122
243
243
k = ichar (c)
244
- if (k>= BA .and. k<= BZ ) k = k - wp
244
+ if (k>= la .and. k<= lz ) k = k - wp
245
245
t = char (k)
246
246
247
247
end function char_to_upper
0 commit comments