Talk:Brainfuck algorithms
From Esolang
An alternate if-else, which I was unsure of how to express with the variable name notation. I don't know whether it's essentially a duplicate of the current if-else, but they looked different enough.
The pointer will always be at x when either code1 or code2 is executed. It should be returned there once the code is done, and temporaries must not be interefered with. The temps both end up zero once the conditional has evaluated, and the pointer ends at x.
The tape: x y z Pointer begins at x. y and z are temporaries. >[-]+ >[-]<< [ code1 >-]> [<code2>->]<<
Let me know what you think.
-- Ben-Arba -- 06:45, 11 Oct 2005 (GMT)
Very cool.. This should be equivalent:
temp0[-] temp1[-]+ temp2[-] temp0[ code1 >-] temp1[ temp0 code2 temp1- temp2] temp0
--Calamari 12:59, 12 Oct 2005 (GMT)

