I found a BrainFuck Porgram and I wanted to know what it does.
Can anyone comment on what each step does?
I have no experience in this and someone with experience will probably recognize patterns they have seen earlier.
A big thanks to anyone who can explain to me.
To me it looks like a trolling program because of the consecutive <<>>
>,------------------------------------------------ reads a character and subtracts 48
(though I didn't count the minuses) to get numeric value of a digit instead of ascii code
[>++++++++++
[<<++++++++++>>-]++++++++++
[<<++++++++++>>-]++++++++++
[<<++++++++++>>-]++++++++++
[<<++++++++++>>-]++++++++++
[<<++++++++++>>-]++++++++++
[<<++++++++++>>-]++++++++++
[<<++++++++++>>-]++++++++++
[<<++++++++++>>-]++++++++++
[<<++++++++++>>-]++++++++++
[<<++++++++++>>-]<-] I think this writes 1000*the number previously entered to
the first cell (again, didn't really count)
,------------------------------------------------ same as line 1
[>++++++++++
[<<++++++++++>>-]<-] Adds 100*the number entered to the first cell
,------------------------------------------------
[<++++++++++>-] Adds 10*the number entered
,------------------------------------------------
[<+>-] Adds 1*the number entered
>>>++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++>++++++++++<<<<<<
Fills cells 5, 6, 7 with 48, 32, 10, which are zero, space and newline respectively
[>+>>+<<<-]>>> moves the value of cell 1 to cells 2 and 4
[<<<+>>>-]<< moves cell 4 back to 1 the result being cell 1 copied to cell 2
[< while there is something in cell 1
[>>+>+<<<-]>>>
[<<<+>>>-]< copy it to cell 3
[>>.>.<<<-] print "0 " as many times as cell 3 says
>>>>.<<<<<-]then print a newline and repeat the process
It seems that this program reads a decimal number and then draws a triangle of that many zeros. I didn't run it, so I could be totally wrong though.