Search in: Word
Vietnamese keyboard: Off
Virtual keyboard: Show
Computing (FOLDOC) dictionary
Jump to user comments
programming A semi-mythical language construct dual to the
"go to"; "COME FROM" label would cause the referenced label
to act as a sort of trapdoor, so that if the program ever
reached it, control would quietly and automagically be
transferred to the statement following the "COME FROM".
"COME FROM" was first proposed in R.L. Clark's "A Linguistic
Contribution to GOTO-less programming", which appeared in a
1973 Datamation issue (and was reprinted in the April 1984
issue of "Communications of the ACM"). This parodied the
Mythically, some variants are the "assigned COME FROM" and the
"computed COME FROM" (parodying some nasty control constructs
in Fortran and some extended BASICs). Of course,
multitasking (or nondeterminism) could be implemented by
having more than one "COME FROM" statement coming from the
same label.
In some ways the Fortran "DO" looks like a "COME FROM"
statement. After the terminating statement number/"CONTINUE"
is reached, control continues at the statement following the
DO. Some generous Fortrans would allow arbitrary statements
(other than "CONTINUE") for the statement, leading to examples
C imagine many lines of code here, leaving the
C original DO statement lost in the spaghetti...
10 FORMAT(1X,I5,G10.4)
in which the trapdoor is just after the statement labelled 10.
(This is particularly surprising because the label doesn't
appear to have anything to do with the flow of control at
While sufficiently astonishing to the unsuspecting reader,
this form of "COME FROM" statement isn't completely general.
After all, control will eventually pass to the following
statement. The implementation of the general form was left to
Univac Fortran, ca. 1975 (though a roughly similar feature
existed on the IBM 7040 ten years earlier). The statement
"AT 100" would perform a "COME FROM 100". It was intended
strictly as a debugging aid, with dire consequences promised
to anyone so deranged as to use it in production code. More
horrible things had already been perpetrated in production
languages, however; doubters need only contemplate the
"ALTER" verb in COBOL.