FORTRAN Programming: A Basic Introduction (PART II)

In college, before video games, we would amuse our- selves by posing programming exercises. One of the favorites was to write the shortest self-reproducing program. Since this is an exercise divorced from reality, the usual vehicle was FORTRAN. Actually, FORTRAN was the language of choice for the same reason that three-legged races are popular.

Ken Thompson, Communications of the ACM. 27 (8), 761–763, 1984.

This is the second part of the basic introductin to FORTRAN programming series.

Control Statements 

Relational operators

Relational operators are used for comparison between variables

< or .lt. : less than 

<= or .le. : less than or equal to 

> or .gt. : greater than 

>= or .ge. :greater than or equal to

== or .eq. : equal to  

/= or .ne. : not equal to

Logical operators

Logical operator are used to perfrom

.and. : Logical multiplication ( and) 

.or. : Logical addition (or) 

.not. : Logical negation (not)

Continue reading