On 09/28/2014 10:08 AM, Fred Cisin wrote:
Surely, you could write a C compiler in FORTRAN.
C SHIFT LEFT 1 BIT
X = X + X
Right, so 5 shifted left one bit: is it the two-digit number 10 or a
record mark (8+2)? One is an arithmetic interpretation; the other a
bitwise-logical interpretation.
I figure that Paul would defend his "C works on everything" by saying
that you can emulate boolean operations on emulated variables. But
that's just hiding it all under the bushel of Turing-completeness. I
can emulate a PDP-11 on a 1620 (or vice-versa), given enough memory and
code.
That ignores the best features of the architecture, such as variable
word and record length. Recall that words are addressed by their
highest (least significat digit) address (e.g. if you have a number
that's 012345, it's the address of the '5' digit), but records, (i.e.
the character string "HELLO WORLD" is addressed by the "H"). FORTRAN
got around this by having no character nor pointer types and no boolean
operators (at least in its basic FORTRAN II form). I'm not sure that C
would know what to make of record- or group marks, or numeric blanks.
--Chuck