- #1
equillibrium
- 2
- 0
Hello all,I have a small doubt. I use F95/90 and IBM compiler.This is a portion of my text file
-----------------------
Alpha Singles Amplitudes
15 3 23 4 -0.186952
15 3 26 4 0.599918
15 3 31 4 0.105048
15 3 23 4 0.186952
Beta Singles Amplitudes
15 3 23 4 0.186952
15 3 26 4 -0.599918
15 3 31 4 -0.105048
15 3 23 4 -0.186952
END
---------------------
I am trying to extract the numerical values from the attached file 1.txt . and I am facing a strange error in the output which I cannot understand. Every time I execute the program it skips the loop between 'Beta' and 'END'. I am trying to read and store the values.
The number of lines inside the Alpha- and beta loop is not fixed. So a simple 'do loop' is of no use to me. I tried the 'do while' but it gives the output as :
-------------------------------------------------------------------------------------
AS 15 3 23 4 -.186952
AS 15 3 26 4 .599918
AS 15 3 31 4 .105048
AS 15 3 23 4 .186952
1525-097 A READ statement using decimal base input found the invalid digit 'a' in the input file. The program will recover by assuming a zero in its place.
1525-097 A READ statement using decimal base input found the invalid digit 'e' in the input file. The program will recover by assuming a zero in its place.
1525-097 A READ statement using decimal base input found the invalid digit 'p' in the input file. The program will recover by assuming a zero in its place.
1525-097 A READ statement using decimal base input found the invalid digit 'l' in the input file. The program will recover by assuming a zero in its place.
This is the end
--------------------------------------------------------------------------------------
Any suggestions would of of great help. I coudn't find the error in logic in my code.I have attached the code (Text.txt).
Thanks in advance
-----------------------
Alpha Singles Amplitudes
15 3 23 4 -0.186952
15 3 26 4 0.599918
15 3 31 4 0.105048
15 3 23 4 0.186952
Beta Singles Amplitudes
15 3 23 4 0.186952
15 3 26 4 -0.599918
15 3 31 4 -0.105048
15 3 23 4 -0.186952
END
---------------------
I am trying to extract the numerical values from the attached file 1.txt . and I am facing a strange error in the output which I cannot understand. Every time I execute the program it skips the loop between 'Beta' and 'END'. I am trying to read and store the values.
The number of lines inside the Alpha- and beta loop is not fixed. So a simple 'do loop' is of no use to me. I tried the 'do while' but it gives the output as :
-------------------------------------------------------------------------------------
AS 15 3 23 4 -.186952
AS 15 3 26 4 .599918
AS 15 3 31 4 .105048
AS 15 3 23 4 .186952
1525-097 A READ statement using decimal base input found the invalid digit 'a' in the input file. The program will recover by assuming a zero in its place.
1525-097 A READ statement using decimal base input found the invalid digit 'e' in the input file. The program will recover by assuming a zero in its place.
1525-097 A READ statement using decimal base input found the invalid digit 'p' in the input file. The program will recover by assuming a zero in its place.
1525-097 A READ statement using decimal base input found the invalid digit 'l' in the input file. The program will recover by assuming a zero in its place.
This is the end
--------------------------------------------------------------------------------------
Any suggestions would of of great help. I coudn't find the error in logic in my code.I have attached the code (Text.txt).
Thanks in advance
Attachments
Last edited by a moderator: