I have a problem with a string.
I have this piece of code:
write(*,*) LEN(lead_print_name), LEN(TRIM(lead_print_name))
the results is:
lead_print_name = "gaussian"
What could be the possible error in my code?
thanks to everyone
How about you show us a small but complete program that demonstrates the problem? My experience is that code snippets often hide the actual source of error.
In my case there is a selectcase to select the correct words in the name lead_print_name. Unfortunately, no cases were matched and this creates empties spaces.
I think that the last part ("creates empty spaces") is incorrect. If no matching clause was found in a SELECT construct, the variable in question would simply retain its previous value. That previous value could be a string of spaces, or it could be anything else, but nothing was created as a consequence of executing the SELECT statement.