Fortran Figuring Out Missing Values in Fortran Array

  • Thread starter Thread starter Azorio
  • Start date Start date
  • Tags Tags
    Fortran
AI Thread Summary
To represent missing values in an array with a specific placeholder like -99.9, the user is encountering issues where the output displays "*****" instead of the intended value. The code snippet provided shows a loop that prints elements from the array "pro," which has been populated from a data file. The user needs to maintain a fixed loop range while addressing the missing values. A suggestion is made to share the entire code for better troubleshooting, as the problem likely lies in the preceding code that initializes or fills the array.
Azorio
Messages
6
Reaction score
0
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. I need the do loop range to stay fixed because other parts of the array that I will be working with fill the range, but this specific part does not.

Code:
DO i=1,31
PRINT *, pro(1,3,i)
END DO

I have tried setting the array equal to -99.9 before the loop but all that prints is "*****".
 
Technology news on Phys.org
Azorio said:
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. I need the do loop range to stay fixed because other parts of the array that I will be working with fill the range, but this specific part does not.

Code:
DO i=1,31
PRINT *, pro(1,3,i)
END DO

I have tried setting the array equal to -99.9 before the loop but all that prints is "*****".

You need to post the entire code. The code that doesn't work
is what precedes these 3 lines.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...

Similar threads

Replies
20
Views
3K
Replies
13
Views
3K
Replies
5
Views
3K
Replies
19
Views
6K
Back
Top