Exp

From Esolang
Jump to navigation Jump to search

Exp (short for "Expression") is an esoteric coding language based on expressions, created by User:PythonshellDebugwindow.

Instructions

Instruction Meaning
< Open expression
> Close expression
{ Print the ASCII value of the expression/variable inside this pair of curly braces
} See above
{{ Print the integer value of the expression/variable inside this double pair of curly braces
}} See above
@ Sets the previous expression to the variable to the right (the accumulator is the only one)
~ The accumulator variable; can be used with "@", put inside "{}" or "{{}}", or used in an expression

Expressions

Expressions are defined by < and >. Empty expressions (with no values) are invalid. Values in expressions can be represented by adding the appropriate amount of ^s between 2 |s, e.g. 5 would be represented as |^^^^^|; you could also add no ^s for the value to become 0. You could also use the accumulator’s value by using ~ instead of |value|, or user input by using I. Values are separated by operations, which are + (addition), - (subtraction), x (multiplication), and / (division). Instead of using the order of operations, operations are read from left-to-right, and there are no brackets.

Examples

"HELLO WORLD"

{<|^^^^^^^^^| x |^^^^^^^^|>}
{<|^^^^^^^^^^| x |^^^^^^^| - |^|>}
{<|^^^^^^^^^| x |^^^^^^^^| + |^^^^|>}
{<|^^^^^^^^^| x |^^^^^^^^| + |^^^^|>}
{<|^^^^^^^^^^| x |^^^^^^^^| - |^|>}
{<|^^^^^^^^| x |^^^^| - |^|>}
{<|^^^^^^^^^^| x |^^^^^^^^^| - |^^^|>}
{<|^^^^^^^^^^| x |^^^^^^^^| - |^|>}
{<|^^^^^^^^^^| x |^^^^^^^^| + |^^|>}
{<|^^^^^^^^^| x |^^^^^^^^| + |^^^^|>}
{<|^^^^^^^^^^^^^^^^^| x |^^^^|>}

Cat program (1 character)

{<I>}