From: | "robin" <robin51@dodo.com.au> |
Newsgroups: | comp.compilers |
Date: | Mon, 17 Jan 2011 11:55:33 +1100 |
Organization: | Compilers Central |
References: | 11-01-057 11-01-063 |
Keywords: | syntax |
Posted-Date: | 18 Jan 2011 01:00:42 EST |
> <compilers@is-not-my.name>
> With respect to the danger of implicit declarations in Fortran, there are
> plenty of stories of broken code due to statements like DO 10 I = 1.10
> which is an assignment, not a loop. -John]
This kind of thing has more to with a poor syntax rather than implicit
declarations.
The old (orignal syntax) of FORTRAN permitted spaces anywhere (or none
of them) because spaces were ignored [except in strings].
Had spaces been significant, DO 10 I would have been parsed as three
separate tokens. As it was, FORTRAN parsed it as the single token
"DO10I", which was a legal identifier.
[That's an egregious example, but I've written plenty of buggy code where
I spelled a variable name in two ways. Not really a compiler issue, though,
since it's easy enough to implement either way. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.