Gary Gargraves mentioned GO TO, and it got me to remembering something
I and a colleague proposed some time ago:
GO TO can be tamed by the use of COME FROM.
COME FROM was originally proposed (tongue in cheek) in an April issue
of Communications of the ACM as a replacement for GO TO. It was
subsequently implemented, as the only control construct, in the
INTERCAL language.
The problem with GO TO is that when one sees a label, one breaks into
a cold sweat mumbling the question "how does control get here" over
and over.
If GO TO could only go to a COME FROM, GO TO statements were labelled,
the label of the GO TO had to be mentioned in the label of the COME FROM,
and every label in a COME FROM was the label of a GO TO that mentioned
the COME FROM, one could reverse the control flow graph by inspection
(as opposed to "by grep" plus a lot of rejecting accidental similarities).
But, this will never happen in Fortran.
Best regards,
Van Snyder
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|