<s>
In	O
computer	O
programming	O
,	O
COMEFROM	B-Language
(	O
or	O
COME	O
FROM	O
)	O
is	O
an	O
obscure	O
control	O
flow	O
structure	O
used	O
in	O
some	O
programming	O
languages	O
,	O
originally	O
as	O
a	O
joke	O
.	O
</s>
<s>
COMEFROM	B-Language
is	O
the	O
inverse	O
of	O
GOTO	B-Application
in	O
that	O
it	O
can	O
take	O
the	O
execution	O
state	O
from	O
any	O
arbitrary	O
point	O
in	O
code	O
to	O
a	O
COMEFROM	B-Language
statement	O
.	O
</s>
<s>
The	O
point	O
in	O
code	O
where	O
the	O
state	O
transfer	O
happens	O
is	O
usually	O
given	O
as	O
a	O
parameter	O
to	O
COMEFROM	B-Language
.	O
</s>
<s>
Depending	O
on	O
the	O
language	O
used	O
,	O
multiple	O
COMEFROMs	B-Language
referencing	O
the	O
same	O
departure	O
point	O
may	O
be	O
invalid	O
,	O
be	O
non-deterministic	O
,	O
be	O
executed	O
in	O
some	O
sort	O
of	O
defined	O
priority	O
,	O
or	O
even	O
induce	O
parallel	B-Operating_System
or	O
otherwise	O
concurrent	B-Architecture
execution	O
as	O
seen	O
in	O
Threaded	B-Language
Intercal	I-Language
.	O
</s>
<s>
A	O
simple	O
example	O
of	O
a	O
"	O
COMEFROM	B-Language
x	O
"	O
statement	O
is	O
a	O
label	O
x	O
(	O
which	O
does	O
not	O
need	O
to	O
be	O
physically	O
located	O
anywhere	O
near	O
its	O
corresponding	O
COMEFROM	B-Language
)	O
that	O
acts	O
as	O
a	O
"	O
trap	O
door	O
"	O
.	O
</s>
<s>
When	O
code	O
execution	O
reaches	O
the	O
label	O
,	O
control	O
gets	O
passed	O
to	O
the	O
statement	O
following	O
the	O
COMEFROM	B-Language
.	O
</s>
<s>
This	O
may	O
also	O
be	O
conditional	O
,	O
passing	O
control	O
only	O
if	O
a	O
condition	O
is	O
satisfied	O
,	O
analogous	O
to	O
a	O
GOTO	B-Application
within	O
an	O
IF	O
statement	O
.	O
</s>
<s>
The	O
primary	O
difference	O
from	O
GOTO	B-Application
is	O
that	O
GOTO	B-Application
only	O
depends	O
on	O
the	O
local	O
structure	O
of	O
the	O
code	O
,	O
while	O
COMEFROM	B-Language
depends	O
on	O
the	O
global	O
structure	O
–	O
a	O
GOTO	B-Application
transfers	O
control	O
when	O
it	O
reaches	O
a	O
line	O
with	O
a	O
GOTO	B-Application
statement	O
,	O
while	O
COMEFROM	B-Language
requires	O
scanning	O
the	O
entire	O
program	O
or	O
scope	O
to	O
see	O
if	O
any	O
COMEFROM	B-Language
statements	O
are	O
in	O
scope	O
for	O
the	O
line	O
,	O
and	O
then	O
verifying	O
if	O
a	O
condition	O
is	O
hit	O
.	O
</s>
<s>
The	O
effect	O
of	O
this	O
is	O
primarily	O
to	O
make	O
debugging	O
(	O
and	O
understanding	O
the	O
control	O
flow	O
of	O
the	O
program	O
)	O
extremely	O
difficult	O
,	O
since	O
there	O
is	O
no	O
indication	O
near	O
the	O
line	O
or	O
label	O
in	O
question	O
that	O
control	O
will	O
mysteriously	O
jump	O
to	O
another	O
point	O
of	O
the	O
program	O
–	O
one	O
must	O
study	O
the	O
entire	O
program	O
to	O
see	O
if	O
any	O
COMEFROM	B-Language
statements	O
reference	O
that	O
line	O
or	O
label	O
.	O
</s>
<s>
Debugger	O
hooks	O
can	O
be	O
used	O
to	O
implement	O
a	O
COMEFROM	B-Language
statement	O
,	O
as	O
in	O
the	O
humorous	O
Python	B-Language
goto	B-Application
module	O
;	O
see	O
below	O
.	O
</s>
<s>
This	O
also	O
can	O
be	O
implemented	O
with	O
the	O
gcc	O
feature	O
"	O
asm	O
goto	B-Application
"	O
as	O
used	O
by	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
configuration	O
option	O
CONFIG_JUMP_LABEL	O
.	O
</s>
<s>
A	O
no-op	B-Language
has	O
its	O
location	O
stored	O
,	O
to	O
be	O
replaced	O
by	O
a	O
jump	O
to	O
an	O
executable	O
fragment	O
that	O
at	O
its	O
end	O
returns	O
to	O
the	O
instruction	O
after	O
the	O
no-op	B-Language
.	O
</s>
<s>
COMEFROM	B-Language
was	O
initially	O
seen	O
in	O
lists	O
of	O
joke	O
assembly	B-Language
language	I-Language
instructions	O
(	O
as	O
'	O
CMFRM	O
 '	O
)	O
.	O
</s>
<s>
COMEFROM	B-Language
was	O
eventually	O
implemented	O
in	O
the	O
C-INTERCAL	O
variant	O
of	O
the	O
esoteric	O
programming	O
language	O
INTERCAL	B-Language
along	O
with	O
the	O
even	O
more	O
obscure	O
'	O
computed	O
COMEFROM	B-Language
 '	O
.	O
</s>
<s>
There	O
were	O
also	O
Fortran	B-Application
proposals	O
for	O
'	O
assigned	O
COME	O
FROM	O
 '	O
and	O
a	O
'	O
DONT	O
 '	O
keyword	O
(	O
to	O
complement	O
the	O
existing	O
'	O
DO	O
 '	O
loop	O
)	O
.	O
</s>
<s>
On	O
1	O
April	O
2004	O
,	O
Richie	O
Hindle	O
published	O
an	O
implementation	O
of	O
both	O
GOTO	B-Application
and	O
COMEFROM	B-Language
for	O
the	O
Python	B-Language
programming	I-Language
language	I-Language
.	O
</s>
<s>
The	O
following	O
is	O
an	O
example	O
of	O
a	O
program	O
in	O
a	O
hypothetical	O
BASIC	B-Language
dialect	O
with	O
"	O
COMEFROM	B-Language
"	O
instead	O
of	O
"	O
GOTO	B-Application
"	O
.	O
</s>
<s>
The	O
instruction	O
"	O
REM	O
"	O
on	O
line	O
40	O
is	O
simply	O
a	O
NOP	B-Language
(	O
in	O
this	O
case	O
,	O
a	O
REMark	O
or	O
comment	O
)	O
—	O
the	O
"	O
COMEFROM	B-Language
"	O
statement	O
on	O
line	O
10	O
causes	O
a	O
branch	O
back	O
to	O
that	O
line	O
when	O
execution	O
reaches	O
line	O
40	O
,	O
regardless	O
of	O
its	O
contents	O
.	O
</s>
<s>
A	O
fully	O
runnable	O
example	O
in	O
Python	B-Language
with	O
the	O
joke	O
goto	B-Application
module	O
installed	O
(	O
which	O
uses	O
debugger	O
hooks	O
to	O
control	O
program	O
execution	O
)	O
looks	O
like	O
this	O
:	O
</s>
<s>
This	O
is	O
an	O
implementation	O
in	O
Ruby	B-Language
of	O
the	O
Intercal	B-Language
COME	O
FROM	O
statement	O
.	O
</s>
<s>
The	O
OS/360	O
Fortran	B-Application
G	O
compiler	O
has	O
a	O
debug	O
packet	O
feature	O
.	O
</s>
<s>
Its	O
"	O
AT	O
"	O
statement	O
is	O
similar	O
to	O
COMEFROM	B-Language
in	O
that	O
it	O
hands	O
the	O
control	O
flow	O
over	O
to	O
the	O
debug	O
block	O
.	O
</s>
