-
-
Save ComingNine/347d4f5e3d1ce8eff5a4 to your computer and use it in GitHub Desktop.
Fortran version of Delphi's SysUtils.f90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!***|****1****|****2****|****3****|****4****|****5****|****6****|****7** | |
MODULE SysUtils | |
IMPLICIT NONE | |
CONTAINS | |
!***|****1****|****2****|****3****|****4****|****5****|****6****|****7** | |
FUNCTION UpperCase (String) | |
USE System | |
IMPLICIT NONE | |
CHARACTER(LEN=:), ALLOCATABLE :: UpperCase | |
CHARACTER(LEN=*), INTENT(IN) :: String | |
INTEGER(KIND=I8) :: I | |
INTEGER(KIND=I8) :: L | |
L = LEN(String) | |
UpperCase = String | |
DO I = 1, L | |
SELECT CASE (UpperCase(I:I)) | |
CASE ('a':'z') | |
UpperCase(I:I) = ACHAR(IACHAR(UpperCase(I:I)) - 32) | |
END SELECT | |
END DO | |
END FUNCTION UpperCase | |
END MODULE SysUtils | |
!***|****1****|****2****|****3****|****4****|****5****|****6****|****7** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment