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 ">". Values in expressions can be represented by adding the appropriate amount of "^"s between 2 "|"s, e.g. 5 would be represented as "|^^^^^|" (minus the quotes); you could also add no "^"s for the value to become 0. You could also use the accumulator’s value by using "~" instead of "|...|", or user input by using "I" (capital letter "i"). Values are separated by operations, which are "+" (plus), "-" (minus), "x" (times), and "/" (divide). Instead of using the order of operations, operations are read from left-to-right, and there are no brackets.

Examples

"Hello World" (all caps)

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

Cat program (1 character)

{I}