PocketBF

From Esolang
Jump to navigation Jump to search
This article is not detailed enough and needs to be expanded. Please help us by adding some more information.

PocketBF is a tinyBF derivative with a dedicated I/O command.

Commands

Command Effect if the direction is…
positive negative
= Switch the direction from positive to negative. Switch the direction from negative to positive.
+ Increment the current cell by one.
brainfuck equivalent: +.
Decrement the current cell by one.
brainfuck equivalent: -.
> Move the cell pointer one step to the right.
brainfuck equivalent: >.
Move the cell pointer one step to the left.
brainfuck equivalent: <.
| If the current cell value equals zero, jump forward past the matching negative |.
brainfuck equivalent: [.
If the current cell value does not equal zero, jump back past the matching positive |.
brainfuck equivalent: ].
; If the current cell value equals zero, query the user for an input character and store its ASCII code in the current cell. Otherwise, output the character corresponding to the current cell value construed as an ASCII code.
Approximate brainfuck equivalents: , and ..

Examples

Cat program

An infinitely repeating cat program is implemented in the following:

+|=+=;=;=|=+|=+=|

See also

Related programming languages comprehend:

Interpreter

  • Common Lisp implementation of the InstructionPointerBF programming language. The program also contains a PocketBF interpreter, given their consanguinity.