Some answers to above questions
Variable names are
all uppercase
Variable names
limited to 6 characters (first required to be alphabetic rest
can
be alphanumeric)
Variables names
which begin w/ A-H and 0-Z are by default floating point or
real variables
Variables which begin
with I-N are by default integers
Early FORTRAN had
no character variables
Could change
default by saying “INTEGER apple”
FORTRAN had to be
written in particular columns
-Column 1 were comments
-Column 2-5 held numeric labels
-Column 6 reserved for continuation
-Column 7 – 72for program statements
-Column 72-80 reserved for numbering
the cards (purely to
reassemble
punch cards in order)
Spaces between
variable names ignored i.e R E D is same as RED
=
None
Go to 10 -
unconditional branch
If statement –
discussed in class
IF (X .LE. 5.3) Y = 23
Computed go
to
go(10,
12, 16, 18, 197, 6)I
If I has value of 1, goes to first
number and so forth
Arithmetic if
If(J) 10, 144, 367
3 way branch- J<0 goes first
number, J=0 goes to 2nd number, J>0
goes
to 3rd number
Essentially only had for loop
Do 10 x = 1, 15, 3
c (coding)
10 continue
sets x to 1, continues while x is less than 15 and is incremented by 3
*, **, +, -
SQRT(), IFIX(), etc
Stop (can be written anywhere and stops program at this point)
End (marks end of code where compiler stops)