Set v0.1

Set is a programming language with only 1 command. However, that one command is enough to do almost anything. Original post on /r/esolangs by user qwertyu63. Check the GitHub repo and feel free to contribute!



        

Variables and Integers:

Set supports 52 variables. Each variable is a single upper or lower case letter and stores a single unbounded integer. All lower case variables are initialized to 0; all upper case variables are initialized to their ASCII representation (65-90). There is also a special system variable indicated by a question mark (?). ? contains the line of code currently being executed. Setting it to a different value jumps code execution to that line. When using an integer as an argument, it must be a positive integer.

Commands:

As previously estabilished, there is just 1 command in Set: Set A B. Each Set command must be on its own line. Set takes two arguments: A must be either a variable or an exclamation point. B must be either a variable, an exclamation point, a combiner or an integer. The Set command sets the variable indicated by argument A to the value of argument B.

Special Arguments:

Exclamation points indicate input/output. When used as argument A, it outputs the ASCII character matching argument B to the screen. When used as argument B, it takes an ASCII character as input and sets argument A to the matching integer. Combiners allow you to combine two numbers into one. There are two valid combiners; each used in the place of argument B (e.g. Set A (N+M)):

N and M must be either a variable or a single digit integer. By putting a conditional in front of a Set command (e.g. [X/Y] Set A B), you can make that command only run in some situations. There are two valid conditionals:

If the condition is not met, the command is not run. X and Y must be either a variable or a single digit integer.

Adaptation:

Although not specified in the original concept of the Set language, other values of the ASCII table may be used to produce better readable output. Common values are line feed, using a value of 10 and the space, by setting the value of 32. Also, the > (greater than) character may be used to insert comments on the Set code.