The Officially Unofficial Home of the If-Goto Programming Language

~ soxfox


What is this?

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.

How does it work?

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:

The valid actions are:

Exit Codes

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.

Where can I get it?

Right here!

You can also download the officially unofficial sample program.

Why?

That's a good question.

What do you mean "officially unofficial"?

Screenshot of a Discord conversation where HanamileH agrees to allow soxfox42 to create officially unofficial if-goto content.