If-goto is a silly esolang created by HanamileH for some strange reason. As the name suggests, there are (approximately) two language constructs – if and goto.
Despite this seeming like a major limitation, if-goto has been shown to be Turing Complete (by me) using a Brainfuck to if-goto translator.
HanamileH has stated that the inspiration for if-goto came from three languages: Lua, Assembler, and Brainfuck.
If-goto uses an arbitrarily long tape of byte-sized cells, much like Brainfuck. The current tape address starts at 0. Cells wrap around if they would go above 255 or below 0.
Each line of if-goto code takes the form if [condition]: [action], where [condition] and [action] are replaced with valid code. Lines are executed in order, and if the condition in a line is true, the action is performed.
Comments are supported, and start with //.
The valid conditions are:
1 is always true.0 is always false. There's no reason for this to exist.ram [value] is true if the current tape cell is equal to [value].adr [value] is true if the current tape address is equal to [value].The valid actions are:
goto [line] Jumps to the specified line (numbered from 1). See also Exit Codes.ram Writes the byte in the current cell to standard output.>ram Reads a byte from standard input and stores it in the current cell.ram++/ram-- Increments/decrements the byte in the current cell.adr++/adr-- Increments/decrements the tape address.If the program jumps to "line 0" it will instead exit successfully (exit code 0). If it jumps to a negative line it will exit unsuccessfully with the absolute value of that line as the exit code.
You can also download the officially unofficial sample program.
That's a good question.