D
Dennis Lee Bieber
But, you have to remember that in those days, CPU time was an expensive
and scarce resource, and languages were designed to be easy for the
computer to process. The thought of making the machine do something
that a person could do themselves was absurd.
So we end up with a language that can't separate a loop from an
assignment until it get to parsing the loop end-point
do10i=3,14159
vs
do10i=3.14159
The compiler has to either assume the "do" is a loop, the "10"
is a label, the "i" is the index variable, ignore the "=", assume the
"3" is the beginning of the index start range, find a "." and assume the
loop is over floating data, find the EOL after the "14159", check the
NEXT line for continuation marker... and then realize: Whoops, this is
an assignment...
OR assume "do10i" is a variable, the "=" signifies an assignment,
the "3" begins the expression, then find a "," which is not valid in an
assignment, and go back to try as a do loop. I, somehow, suspect the
first variant is more likely as it is using the minimal parse
"do"->attempt do loop, vs the greedy parse of "do10i" as a variable.
FORTRAN does not have a syntax easy for a computer to parse. It
had a syntax that was easy for a number-cruncher scientist to write
complex expressions with.
--