Execute Brain****/Java: Difference between revisions

m
Formatted the information a bit more
m (Missed a space)
m (Formatted the information a bit more)
Line 1:
{{implementation|Brainf***}}{{collection|RCBF}}
In this implementation of [[Brainf***]], the code is read in all at once and checked for uneven brackets (unequal amounts of [ and ] commands). If that error occurs, the code will obviously not be run. Under the hood, the program memory is an ArrayList of Integers which expands only to the right. So, if the pointer moves past zero to the left, the program will exit. Due to the BufferedReader input class, return characters (ASCII 10 and 13) are ignored on input (the , command).
 
Under the hood, the program memory is an ArrayList of Integers which expands only to the right. So, if the pointer moves past zero to the left, the program will exit. Due to the BufferedReader input class, return characters (ASCII 10 and 13) are ignored on input (the , command). More detailed information can be found in the comments scattered about the code.
 
import java.io.BufferedReader;
Anonymous user