hi all, can anyone maybe explain to me what i am doing wrong with the TRIM function, because it doesn't actually remove any blanks from my string. The code is here:
program trim_err
implicit none
character(30) :: my_string
my_string = ' 123465 '
print *, '|'//my_string//'|'
my_string = trim(my_string)
print *, '|'//my_string//'|'
end program trim_err
This produces the following output (of length 30):
| 123465 |
| 123465 |
Any ideas would be appreciated!
program trim_err
implicit none
character(30) :: my_string
my_string = ' 123465 '
print *, '|'//my_string//'|'
my_string = trim(my_string)
print *, '|'//my_string//'|'
end program trim_err
This produces the following output (of length 30):
| 123465 |
| 123465 |
Any ideas would be appreciated!