Brainfuck

Aus ProgrammingWiki
Archivierte Version vom 2019-10-24T10:04:13+00:00. Aktuelle Version

Die Programmiersprache Brainfuck ist keine ernsthafte Programmiersprache, sie gilt aber mit ihren wenigen Befehlen dennoch als Turing-complete und kann damit theoretisch alles berechnen, was mit anderen Programmiersprachen auch möglich ist.

Brainfuck kennt die folgenden 8 Befehle:

> = increases memory pointer, or moves the pointer to the right 1 block.
< = decreases memory pointer, or moves the pointer to the left 1 block.
+ = increases value stored at the block pointed to by the memory pointer
- = decreases value stored at the block pointed to by the memory pointer
[ = like c while(cur_block_value != 0) loop.
] = if block currently pointed to's value is not zero, jump back to [
, = like c getchar(). input 1 character.
. = like c putchar(). print 1 character to the console

Hier ein Hallo World! Programm in Brainfuck: