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.

Waterfall

From Esolang
Jump to navigation Jump to search

Waterfall is designed by PSTF. It is somewhat related to Brainfuck.

Command Set

This program has two data storage: one is a tape, another is three accumulators (a, b, c).

Command Table
Command Meaning
> Move the pointer right by b.
< Move the pointer left by b.
+ Increase the pointed cell by a.
- Decrease the pointed cell by a.
A Add a by 1.
a Subtract a by 1.
B Add b by 1.
b Subtract b by 1.
C Add c by 1.
c Subtract c by 1.
/ Swap the value of A and C.
\ Swap the value of B and C.
, Input a character and store it to current cell.
. Output the value of current cell as character.
; Input an integer ended by a white character and store it to current cell.
: Output the value of current cell as number.
^ Transfer the value of C to the current cell.
v Transfer the value of the current cell to C.
[ Jump to the matching bracket if current cell is 0.
] Jump back to the matching bracket if current cell isn't 0.
{ Jump to the matching brace.
} Do nothing, but must paired.
* Multiply the current cell by A.
` Divide the current cell by A, result in quotient.
% Divide the current cell by A, result in remainder.
0 Clear the current cell.
# NOP.
@ Halt.

Examples

A+B Problem

A;>;[-<+>]<:

See Also

Categories