A weird language with an ugly name.
The Brainf*** language has eight instructions:
> Increment memory pointer
< Decrement memory pointer
+ Increment number at pointer
- Decrement number at pointer
, Input a byte and store it at pointer
. Output number at pointer as a byte
[ Jump forward to matching ] if number at pointer is zero
] Jump back to matching [ unless number at pointer is zero
For example, multiplying 6*7=42 and putting it out as an ASCII
character (asterisk *) is:
>++++++[<+++++++>-]<.
Zero is
[-]
Copying all standard input to standard output can be
expressed as:
,+[-.,+]
You will find many more examples on the web but it is much
more fun experiencing yourself.
These files are FREE SOFTWARE and underly the GNU General Public License (GPL). NO WARRANTY FOR NOTHING.
Software patents: The threat prevails. Please read further at FFII.
Author and maintainer: Bertram Scharpf
Latest update:
Mon 07 Mär 2005 19:47:15 CET