PDA

View Full Version : how to trim and adjustl in .NET?


Cynthia
03-09-2004, 11:08 PM
I am trying to port some .90 code to Lahey Fortran .NET and it
errors on my trim and adjustl calls

error is:

Instrinsic procedure 'trim' is restricted in this version of Fortran for .NET

same for 'adjustl'

I am wondering how to get around this or what function to use becuase it seems Lahey 95 has TRIM and ADJUSTL.

Thanks for any input.
Cynthia

tzeis
03-10-2004, 11:03 PM
For the TRIM function, you can convert to the string type using the USTRING function, use the String%Trim() method, and convert back to the character type using the STRING function.
Unfortunately, for the ADJUSTL function, I don't have a good solution beyond brute force.
I will update this thread as more information becomes available on support for these intrinsics, or better workarounds.