Please send questions to
st10@humboldt.edu .
* early FORTRAN had an arithmetic IF statement (see PDF 5)
* a little-bit-later FORTRAN also added a
logical IF-statement:
IF (X .EQ. A(I)) K = I - 1
...but note that is a SINGLE statement when the condition
is true; the idea of a block comes with Algol-58/Algol-60!
* in early FORTRAN, the GOTO and its variants
are the WORKHORSE of control flow;
another FORTRAN goto: assigned GOTO
GOTO N, (L1, L2, ... Ln)
...which must be used with ASSIGN
ASSIGN 20 to N
...which puts the ADDRESS of STATEMENT 20 into variable N
* IN early FORTRAN, the DO loop COULD be nested --
not very many statements could;
Algol-58, Algol-60 introduce the idea of block-structures;
(the idea that you can put a block ANYWHERE a statement -
that it can be treated as a statement -- is from Algol-60!)
Algol-60 -- like 2nd generation languages -- tended toward
baroque, richly-featured control structures;
Algol-60 for loop:
for var := expr step exrp1 until expr2 do sttmt
or
for var := expr while expr do stmt
or
for var := 31, 38, 40, 27 do stmt
and more...
for i := 3, 7,
I1 step 1 until 16,
i/2 while i >= 1,
2 step i until 32
do print (i)
* rich to the point of being hard to implement,
and hard to read/understand;