COMEFROM

In computer programming, COMEFROM (or COME FROM) is an obscure control flow structure used in some programming languages, originally as a joke.

<code>COMEFROM is roughly the opposite of GOTO in that it can take the execution state from any arbitrary point in code to a COMEFROM statement. The point in code where the state transfer happens is usually given as a parameter to COMEFROM. Whether the transfer happens before or after the instruction at the specified transfer point depends on the language used. Depending on the language used, multiple COMEFROMs referencing the same departure point may be invalid, be non-deterministic, be executed in some sort of defined priority, or even induce parallel or otherwise concurrent execution as seen in Threaded Intercal.

A simple example of a "COMEFROM x" statement is a label x (which does not need to be physically located anywhere near its corresponding COMEFROM) that acts as a "trap door". When code execution reaches the label, control gets passed to the statement following the COMEFROM. The effect of this is primarily to make debugging (and understanding the control flow of the program) extremely difficult, since there is no indication near the label that control will mysteriously jump to another point of the program.

Read more about COMEFROM:  History, Practical Uses, Hardware Implementation

Other articles related to "comefrom":

COMEFROM - Hardware Implementation
... DSP supports a DO..UNTIL instruction, intended for do..while loops, that is essentially a COMEFROM ... Example LCNTR=42 DO x UNTIL LCE /* COMEFROM x, unless the loop counter is zero */ F12=F0*F4, F8=F8+F12, F0=dm(I0,M3), F4=pm(I8,M9) IF NZ dm(I2,M2 ... With an always-true condition, we have a genuine COMEFROM ...