Hello Forum,
I have the following problem and I would be very glad if someone has an idea.
I want to read an ASCII file. Besides many other information the ASCII file contains the following lines at different positions within the file
Length L R = 1 ,3 ,14.48,19.555,24.63
Length L R = 1 ,2 ,100.57,78.965,57.36
Length L R = 1 ,1 ,110,80,50
In this three example lines I only want to read the numbers after the third komma.
So in this case it would be 19.555, 78.965 and 80. The problem is that they are located at different position, depending on the decimals of the prevous numbers.
This means that this idea does not work
IF (line(1:6) .EQ. 'Lenght' ) THEN
READ (line(33:38),'(F8.2)') len
I function would be nice, where the comma is counted and after the third comma the respective number should be used.
Does somebody has an idea how to do this? Another way is also greatly appreciated
I have the following problem and I would be very glad if someone has an idea.
I want to read an ASCII file. Besides many other information the ASCII file contains the following lines at different positions within the file
Length L R = 1 ,3 ,14.48,19.555,24.63
Length L R = 1 ,2 ,100.57,78.965,57.36
Length L R = 1 ,1 ,110,80,50
In this three example lines I only want to read the numbers after the third komma.
So in this case it would be 19.555, 78.965 and 80. The problem is that they are located at different position, depending on the decimals of the prevous numbers.
This means that this idea does not work
IF (line(1:6) .EQ. 'Lenght' ) THEN
READ (line(33:38),'(F8.2)') len
I function would be nice, where the comma is counted and after the third comma the respective number should be used.
Does somebody has an idea how to do this? Another way is also greatly appreciated