Convert the string to uppercase.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(inout) | :: | str |
subroutine uppercase(str) implicit none character(len=*),intent(inout) :: str integer :: i,idx do i=1,len_trim(str) idx = index(str(i:i),lower) if (idx>0) str(i:i) = upper(idx:idx) end do end subroutine uppercase