I\'ve been searching the web and I\'m finding somewhat contradictory answers. Some sources assert that a language/machine/what-have-you is Turing complete if and only if it has
If you can compute the address for your goto
or jmp
, you can simulate arbritary conditionals. I occasionally used this to simulate "ON x GOTO a,b,c" in ZX Basic.
If "true" has the numerical value 1 and "false" 0, then a construction like:
if A then goto B else goto C
is identical to:
goto C+(B-C)*A
So, yes, with a "computed goto" or the ability to self-modify, a goto or jmp can act as a conditional.