LowCase Subroutine

public subroutine LowCase(str1, str2)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: str1
character(len=*), intent(out) :: str2

Called by

proc~~lowcase~~CalledByGraph proc~lowcase LowCase proc~checksyntax CheckSyntax proc~checksyntax->proc~lowcase proc~mapl_stateeval MAPL_StateEval proc~mapl_stateeval->proc~lowcase proc~mapl_stateeval->proc~checksyntax proc~parser_variables_in_expression parser_variables_in_expression proc~parser_variables_in_expression->proc~lowcase proc~evaluate_derived_field DerivedExport%evaluate_derived_field proc~evaluate_derived_field->proc~mapl_stateeval proc~test_arithmetic_2d test_arithmetic_2d proc~test_arithmetic_2d->proc~mapl_stateeval proc~test_arithmetic_3d test_arithmetic_3d proc~test_arithmetic_3d->proc~mapl_stateeval proc~test_arithmetic_mixed test_arithmetic_mixed proc~test_arithmetic_mixed->proc~mapl_stateeval

Source Code

  SUBROUTINE LowCase (str1, str2)
    !----- -------- --------- --------- --------- --------- --------- --------- -------
    ! Transform upper case letters in str1 into lower case letters, result is str2
    !----- -------- --------- --------- --------- --------- --------- --------- -------
    IMPLICIT NONE
    CHARACTER (LEN=*),  INTENT(in) :: str1
    CHARACTER (LEN=*), INTENT(out) :: str2
    INTEGER                        :: j,k
    CHARACTER (LEN=*),   PARAMETER :: lc = 'abcdefghijklmnopqrstuvwxyz'
    CHARACTER (LEN=*),   PARAMETER :: uc = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    !----- -------- --------- --------- --------- --------- --------- --------- -------
    str2 = str1
    DO j=1,LEN_TRIM(str1)
       k = INDEX(uc,str1(j:j))
       IF (k > 0) str2(j:j) = lc(k:k)
    END DO
  END SUBROUTINE LowCase