|
In computer programming, "Come from" or "COME FROM" is a branching instruction or flow control instruction similar to "Goto". Computer programming (often simply programming) is the craft of implementing one or more interrelated abstract algorithms using a particular programming language to produce a concrete computer program. ...
This page is about the programming command. ...
"Come from" differs from "Goto" in the direction of the branching. Whereas "Goto" transfers execution from the branching instruction to its target, "Come from" works the opposite way, transferring execution to the branching instruction from its target, hence its name. "Come from" is both semantically and syntactically entirely valid and can theoretically be used as a replacement for "Goto". However, it is considerably more difficult to visualise in program design and actually implement in a programming language. Therefore, it is very rarely used, and real-world implementations are limited to jocular languages like INTERCAL. A programming language or computer language is a standardized communication technique for expressing instructions to a computer. ...
INTERCAL is a programming language parody, the canonical esoteric programming language. ...
Example The following is an example of a hypothetical BASIC program with "Come from" instead of "Goto". BASIC is a family of high-level programming languages. ...
10 COME FROM 40 20 INPUT "WHAT IS YOUR NAME? "; A$ 30 PRINT "HELLO, "; A$ 40 REM The program (hypothetically) works by asking the user for their name, then greeting them with the same name, and continuing all over again. The instruction "Rem" on line 40 is superficial - the "Come from" statement on line 10 causes a branch back to that line when execution reaches line 40, regardless of its contents. |