We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

BAR-X

From Esolang
Jump to navigation Jump to search
The title of this article is not correct because of technical limitations. The correct title is actually |x.
This is still a work in progress. It may be changed in the future.

|x is an esolang made by User:Wertix96 that only uses letters and the character '|'.

Defining instructions

The syntax for defining instructions is:

|x or |xy
    <op1 here>
    <op2 here>
    ...

<op> can be a defined variable, '.' for 1 or '_' for -1.

Lines are added together. 'xy' multiplies x and y together. After the calculations, the final value is the value of that definition.

Defining instructions
Name Pre-defined Syntax Meaning
Set No / Yes |x Sets variable x to value of definition
Square root Neither |xy Both x and y are set to square root of value of definition
Division One |xy The undefined one is set to value of definition divided by the defined one
Comparison Both |xy If x*y is equal to value of definition; set both x and y to $t
If then Yes |x If x is equal to $t; execute code inside of definition (Notice that defining instructions are not allowed!)

Non-defining instructions

These instructions can be put outside of definitions.

Non-defining instructions
Name Syntax Meaning
Print x Prints var x as unicode
Jump .x Sets inst pointer to var x
Comment #abcdefg A comment

Example programs

Truth-machine

|a
    .
#input
|b
    .
    .
|c
    bbbbb
    bbbb
    a
c
|aa
    .
|d
    bbbb
    b
|a
    c
    .d

Implementation

An implementation is in the works.