Jumping True

From Esolang
Jump to navigation Jump to search

Jumping True is an esolang created by MathR. Its main particularity is that its conditional statement is based on the truth-machine. It also has jumps, hence its name.

Language overview

In Jumping True there are 9 variables, named from a to i. They can be only true or false. To change the content of a variable you can use:

change [variable name]

If the variable is true then it will be false and if it's false it will be true. You can ask for a value to be put in the variable:

input [variable name]

To display it you can use:

print [value]

where value can be a variable, true or false. The conditional statement is

truth [value]

If value is true, then doing a

return

will jump back to it. You can also do a

jump [somewhere]

which will jump to line somewhere if it's a number or jump to the first

mark [name]

found if somewhere is the name. One jump can only be used one time in an execution, except if the command

resetjumps

is executed. It will "reactivate" all the jumps. There's also an

ascii [1] [2] [3] [4] [5] [6] [7] [8]

command to display a character with 1|2|3|4|5|6|7|8 the ascii code of the character.
There's a pointer which can be incremented with

incptr

and decremented with

decptr

To read and change the pointed value use ptd like a variable name.

Examples

Hello World

ascii 0 1 0 0 1 0 0 0
ascii 0 1 1 0 0 1 0 1
ascii 0 1 1 0 1 1 0 0
ascii 0 1 1 0 1 1 0 0
ascii 0 1 1 0 1 1 1 1
ascii 0 0 1 0 0 0 0 0
ascii 0 1 1 1 0 1 1 1
ascii 0 1 1 0 1 1 1 1
ascii 0 1 1 1 0 0 1 0
ascii 0 1 1 0 1 1 0 0
ascii 0 1 1 0 0 1 0 0
ascii 0 0 1 0 0 0 0 1
ascii 0 0 0 0 1 0 1 0

Truth-machine

input a
truth a
print a
return

If-else

Print the second registered value if the first is true, the third otherwise.

input a
input b
input c
truth true
jump start_if
print c
jump end
mark start_if
truth a
jump return_if
print b
jump end
mark return_if
return
mark end

External resources

Python interpreter: https://github.com/theMathR/Jumping-True