Fortran What Does the Fortran Statement 'IF ( IP - I1 ) 180, 170, 180' Mean?

  • Thread starter Thread starter agalya
  • Start date Start date
  • Tags Tags
    Fortran
AI Thread Summary
The discussion centers on the interpretation of an arithmetic IF statement in Fortran. The statement "IF ( IP - I1 ) 180, 170, 180" directs the program flow based on the result of the expression IP - I1. If the result is less than zero, the program jumps to statement 180; if it equals zero, it goes to statement 170; and if greater than zero, it again jumps to statement 180. The use of this type of statement indicates that the code is likely outdated, as arithmetic IF statements are considered a legacy feature in Fortran programming.
agalya
Messages
9
Reaction score
0
Hi all,

What is the meaning of the following Fortran statement

IF ( IP - I1 ) 180, 170, 180

kindly help,
thank u,
 
Technology news on Phys.org
This is an "arithmetic IF" statement.

If IP - I1 < 0, go to statement 180.
If IP - I1 = 0, go to statement 170.
If IP - I1 > 0, go to statement 180.

You must be reading very old code. :smile:
 
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
2
Views
1K
Replies
4
Views
2K
Replies
1
Views
2K
Replies
3
Views
2K
Replies
16
Views
3K
Replies
6
Views
2K
Back
Top