From 5356cbe321cb787541ecc7ca49f407f2b2861f1f Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Tue, 27 Sep 2022 08:58:07 +0200 Subject: Fortran: use bitwise OR in comparison --- mendeleev.f90 | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/mendeleev.f90 b/mendeleev.f90 index 3108b5e..c7df836 100644 --- a/mendeleev.f90 +++ b/mendeleev.f90 @@ -69,14 +69,7 @@ contains pure integer function tolower(c) character(len=1), intent(in) :: c - integer :: i - - i = iachar(c) - if (i >= 65 .and. i < 90) then - tolower = i + 32 - else - tolower = i - endif + tolower = ior(32, iachar(c)) end function tolower -- cgit v1.2.3