From Esolang
Jump to navigation Jump to search

BrainfuckXT is an extension to Brainfuck by User:KryptonX. BrainfuckXT is a compiled language targeting the .NET Framework. Changes have not been made to Brainfuck syntax and functions. Brainfuck code is valid BrainfuckXT code. Both can be used in unison. Features have been added to make the language more powerful, although BrainfuckXT does not make commercial grade software. Nonetheless, useful daily applications can be made. A compiler can be obtained from here and the source from my github.

Internal data table (values with an * are BrainfuckXT only)

Feature Description
putchar Supports the printing of characters.
100,000 ASCII Character slots 100,000 separate data values can be stored each in their own cell.
Increment Increment slot values.
Decrement Decrement slot values.
Getchar Store user input into selected ASCII slot.
*Getline Store user input into selected string slot.
*30,000 string slots BrainfuckXT supports strings, and can store 30,000 of them simultaneously.
*Files BrainfuckXT handles the I/O of files.
*Memory Addresses Print the address in memory of the selected ASCII character slot.
*String indexing 'nuff said.
*Conditions Execute a block of code if a condition is true or false.

BrainfuckXT Commands (added)

Command Symbol Purpose
@ Prints the memory-address of character in current ASCII slot.
& Passes user-input (line) to currently selected string slot.
$ Print selected string.
{} Manually set string values.
: Clear string and add selected ASCII character.
; Add selected ASCII character to currently selected string (+=).
* Increment indexing integer.
~ Decrement indexing integer.
| Print character using indexing integer as index for selected string.
# Open file for reading (selected string slot) and save file text to the next slot.


BrainfuckXT has two condition statements: ? and !. If the current ASCII slot is equal to 0, the code between the two ?'s will be executed. If the current ASCII slot is not equal to zero, the code between the !'s will be executed. These should not be nested.


In the example above, the selected ASCII slot is equal to 0. The "++." will be executed.

In the example above, the selected ASCII slot is not equal to 0. The "+." will be executed.

Syntax Changes

Although I made it a point to retain most of Brainfuck's original syntax, one major change was made. Loops; they work in the exact same way except that loops CANNOT be nested in BrainfuckXT.

External resources