ParrBF

From Esolang
Jump to navigation Jump to search

ParrBF is a joke language designed by User:Benni++, which is similar to Brainfuck, eventhough the commands < and > are not defined, but every collumn of the program is an variable. There is one additional command - ~ - which outputs the value of the actual cell as an integer.

To set the first variable to - for example - 3 an the second to 5, type

++
++
++
 +
 +


Loops

The 2 Commands [ and ] are defined: [: if the value of the actual cell is 0, jump behind the matching ] bracket in any cell ]: if the value of the actual cell is non-zero, jump back to the matching ] command, in whatever a cell it is.


Example Programs

min(a,b)

 +
 +
 +
 +
 +
 +
 +
 [+
 -+
  +
  +
  +
  +
  +
 ]-
The two values (8 & 5):
++
++
++
++
++
+
+
+
Execute min:
[
--+
 ].

Output "Hello World!":

+
+
+
+
+
+
+
+Helo Wrd!
[+++++++++
-+++++++++
 +++++++++
 +++++++++
 ++++ +++
 ++++ +++
 ++++ +++
 ++++ +++
 ++++ +++
  +++ +++
  +++ +++
  +++  ++
  +++  +
    +  +
] -+- -+++
  -+   ++
  -+    +
   +    +
 ...
   ....
    .  .
   .    ..