Too Many Variables!

From Esolang
Jump to navigation Jump to search

Too Many Variables! is an esolang created by squareroot12621, but you can only assign variables.

Like, seriously, that's all you can do.

Documentation

In Too Many Variables!, lines have to look like this:

<number>=<number><operation><number>

Here, <operation> can be one of +-*/—the standard four operations. However, the <number>s are different from normal numbers, since they can have leading zeroes.

Here's a chart showing how the different number formats work:

Format Regex Description
Assignment Accessing
Number with no leading zeroes [1-9]\d* Variable
Number with 1 leading zero 0[1-9]\d* Literal number
000 000 Literal number 0
0 0 Print chr(<number>) Return ord(input()[0])
00 00 Change line number; if outside program area, halt Get line number
Anything else 00([1-9]\d*|0\d+) Invalid—throws an error

This is pretty much the entire language.

Examples

Print Hello, World!:

1=098+09
0=063+09
0=1-06
0=1+01
0=1+01
0=1+04
0=035+09
0=023+09
0=078+09
0=1+04
0=1+07
0=1+01
0=1-07
0=024+09

Interpreters

Python interpreter (Github)
Note: This interpreter requires at least Python 3 to run.