Brainfun

From Esolang
Jump to navigation Jump to search
This is still a work in progress. It may be changed in the future.

Info

Brainfun is a WIP variant of Brainf--- that was made to be simple, like an actual programming language. It takes on the same way of coding in Brainf---. You have a huge 1D array to increment and decrement values. However, in BrainFun, you have a lot more freedom and ability to code.

Characters
Character Description Example
<n Makes the pointer go left n times. <8 (moves pointer to the left 8 times)
>n Makes the pointer go right n times >3 (moves pointer to the right 3 times)
=n Sets the value you're pointing at into n as a string =Hello, World!
~n Converts the value you're pointing at into a different type ~s (converts it to a string)
. Prints the value you're pointing at. (you already know what this does)
, Sets the value you're pointing at into string input (again, no example needed)
+n Increments the value you're pointing at n times +7 (increments value by 7)
-n Decrements the value you're pointing at n times (no example needed again)

Convertion

Converting types is very important, as setting a data value always makes it a string. Here is the code for converting what you're pointing at into what you want it to be.

Conversion
Code Converts it to...
~s String
~i Integer
~f Float
~e Evaluation/Answer to equation