Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8095237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:03:26+00:00 2026-06-05T21:03:26+00:00

How does one write a (Intel) F90 function that converts a string into lowercase

  • 0

How does one write a (Intel) F90 function that converts a string into lowercase (or, alternatively, uppercase)? I want to pass a character array to the function and have it return a character array, e.g.

program main
    implicit none

    character*32 :: origStr = "Hello, World!"
    character*32 :: newStr

    newStr = to_lower(origStr)
    write (*,*) newStr

end program main

such that this program outputs hello, world!.

I’ve been starting with the to_lower() subroutine found at RosettaCode, but I can’t figure out how to write it as a function.

Thanks in advance!

PS — Bonus points if you can do it with a string of unfixed length!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T21:03:28+00:00Added an answer on June 5, 2026 at 9:03 pm

    As the original author of this code, I’m pleased that it’s of some help. I used to wonder why these functions were not built in to Fortran. My guess is that they only work for a rather restricted set of letters, i.e. the ones used in English. If you have text in almost any other European language you will have characters with accents, and then converting them to upper or lower case is much harder. For example e-grave in French turned into upper case is usually shown as just plain E (the grave accent gets lost), but in e-acute it does not. The designers of Fortran have always tried to provide facilities which suit a wide range of languages, and doing upper/lower case conversion in a multi-language way is not at all easy. At least that’s my guess as to why you have to do it yourself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I want to write a generic function void f<T>() , which does one
How does one write a unit test that fails only if a function doesn't
I am trying to write an Add-In to PowerPoint that does basically one thing:
How can I write an onclick handler that does one thing for regular clicks
How does one import the header of a file into a dict. I've tried
Does any one know of any good javascript 3d graphing utility? I know that
How does one convert an empty string to an int using Struts2. When the
How does one write a script to download one's Google web history? I know
How does one go about finding the month name in C#? I don't want
How does one write to a file after a certain amount of data is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.