I'm having trouble with a read statement. I'd prefer Fortran90, though other versions might be possible if it helps. I have a bunch of lines of data in a file that can be described as:
- space-delimited
- not in a fixed format
- containing a string followed by 7 numbers
- string contains a forward slash /
Here's an example:
maxele/OS1_HC_LF_A_0001_004_maxele.63 4.22E-03 9.00E-01 1.00E-06 1 -999 -999 -999
maxele/OS1_Inl_A_0001_005_maxele.63 2.11E-03 9.00E-01 1.00E-06 3 -999 -999 -999
maxele/OS1_HC_LF_C_0001_009_maxele.63 1.56E-03 9.00E-01 1.00E-06 2 58.77 -82.82 28.91
maxele/OS1_TS_B_0001_006_maxele.63 3.90E-03 9.00E-01 1.00E-06 1 -999 -999 -999
I've learned that Fortran will stop a read statement if it encounters a slash (/) character for unformatted reads, so I have to use format specifiers. And because the string length is unknown, I'm not sure how to make sure the string read stops at the first space. I believe it's possible to read in the whole line, then parse afterwards, but this seems convoluted. Is there no way to force it to treat the data as space-delimited? Thanks in advance.