The ***** appears when I put in a specified format. I took out the specified format statement and the code prints -99.9 through out the entire loop.MY guess is that is overwritting the data in the array and replacing it with -99.9 rather than replacing the values that are not present in the...
I am trying to figure out how to represent missing values in an array with a value I know won't be in there for example -99.9.
A sample of my code, is below. The array "pro" has been read in from a data file of numeric values. The code below print "0.00" where there isn't data to be read. I...
Salgerman, I tried typing out the values myself by hand and you were right. You're code works beautifully, my code reads the fine but when it comes to the real numbers it's carrying them out to 6 decimal places.There must be some characters that are not allowing my read statement to work...
I ran your program including using testx < testx.txt and it still will not work. Maybe there is something wrong with the file? I don't know what to do.
Salgerman, I am not trying to write the values to a new file. I just want the display to show up in the terminal via PRINT statement. I've tried using a different text editor and that did not work. I don't want to deviate much from my code unless it's absolutely necessary. ie opening the file...
Fjacq, I rewrote the READ statement as you said and I do not get a program error; however, the numerical data is not being printed to the screen.
Salgerman, I changed the Y, M, D to integers. I'm not sure what you mean with using a DO WHILE in my program.
I am trying to read and display data from a text file in FORTRAN. Eventually I want to store the data in an array to calculate specific averages but right now I am having trouble getting the data to be read and displayed. With the code below I am getting a program error "STOP ***Input error***"...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.