Question

Was the first implementation of looping control flow effectively the goto (or something like a labelled JMP in assembler) or was there another syntactic construction?

for (für) was introduced in Superplan in 1949 IIRC.

Was it helpful?

Solution

I'm not sure if your question title matches the actual question, as jump instructions in assembler may be relative, i.e. unlabelled as well. I'm also no historian, but I can at least subtract another century from your estimate.

The Analytical Engine devised by Charles Baggage in 1837 was extended in 1845 to contain a conditional jump instruction similar to modern assembler jump operations. See the linked wikipedia entry for an example code.

While that sets back the first implementation of such a control structure by a good century, I cannot say whether earlier versions exist. Most probably you may need to refine your question, as I believe there exists earlier work on the theoretical concept and it's hard to decide whether anything before the analytical engine is an implementation depending on your definition of it.

OTHER TIPS

Assembler has several low-level jump operations including a non-conditional jump to a label and several conditional jumps to a label. The conditional jumps execute only if a specific control flag condition is true, otherwise program flow drops through to the next instruction. There is also a loop instruction that affects the value in the ecx register and jumps to a label when non-zero.

Licensed under: CC-BY-SA with attribution
scroll top