aaronryank / Cubically

An esoteric programming language based on Rubik's Cubes
https://github.com/Cubically
GNU General Public License v3.0
28 stars 6 forks source link

If..Else bugged when nested #6

Closed TehPers closed 7 years ago

TehPers commented 7 years ago

The following code should print "27", however it prints "2745": ?3{%3?0%4}!%5

This is caused by the internal ? failing and setting if_else to 0. When this occurs, the ! after the main conditional sees that ! is 0 and executes.

aaronryank commented 7 years ago

Mostly fixed in the latest commit; I still need to think of a good way to reset do_else if the command after an if is skipped is not else.