Everything2
Near Matches
Ignore Exact
Full Text
Everything2

COME FROM

created by markadm

(idea) by Jargon (1.8 y) (print)   ?   (I like it!) Thu Jul 19 2001 at 6:01:42

cold boot = C = comm mode

COME FROM n.

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. Lawrence 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 then-raging `structured programming' holy wars (see considered harmful). 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, multi-tasking (or non-determinism) 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 like:

      DO 10 I=1,LIMIT
C imagine many lines of code here, leaving the
C original DO statement lost in the spaghetti...
      WRITE(6,10) I,FROB(I)
 10   FORMAT(1X,I5,G10.4)

in which the trapdoor is just after the statement labeled 10. (This is particularly surprising because the label doesn't appear to have anything to do with the flow of control at all!)

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.

COME FROM was supported under its own name for the first time 15 years later, in C-INTERCAL (see INTERCAL, retrocomputing); knowledgeable observers are still reeling from the shock.

--The Jargon File version 4.3.1, ed. ESR, autonoded by rescdsk.


printable version
chaos

INTERCAL comm mode alter Considered Harmful
Watching yourself on video retrocomputing COMECON COBOL
automagically If you could see what your cars are made of, people, you'd shoot yourselves. Where Does Everything Come From? nested function
goto implicit Intercalate Holy Wars
cold boot comeback Sorcerer E2 HTML tags
rescdsk Knowing how to sleep with someone Algol W Datamation
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Nodes to live by:
Leonardo DiCaprio
Mr. Mxyzptlk
Jesus Christ Trigonal Planar
No more prisons
Fear of sex is the power of rape
Saint John's wort
The ultraviolet catastrophe
Breastfeeding
Lemuria
Big O
I'm scared to run the program I wrote
September 11, 1973
24
New Writeups
Lord Brawl
Dr. Horrible's Sing-Along Blog(review)
a8ksh4
regret(idea)
Heisenberg
Editor Log: July 2008(log)
sam512
halfway homes, catacombs, twilight zones(fiction)
Timeshredder
The Texas UFO Crash of 1897(event)
Heitah
The Dark Knight(review)
ignis_glaciesque
Uppsala(place)
ignis_glaciesque
diffusion of responsibility(idea)
TheOrientalAfrican
The Soft Meadow of my Childhood(event)
BookReader
The Dragon Slayers(fiction)
kohlcass
religiously fashionable(review)
Pavlovna
waulking song(thing)
tentative
Stick Man(poetry)
Ereneta
The Fight with the Snapping Turtle: Or, the American St. George(poetry)
sitaraika
Fog and fire(personal)
This affordable entertainment brought to you by The Everything Development Company