Talk:SMG4: Mario Gets His PINGAS Stuck In The Door

From Esolang
Jump to navigation Jump to search

This arrangement tests if the input is zero without using doors.

'V0;!8+P
        > "Non-zero"R::::::::
         >"Zero"R::::

It puts a downward arrow either at X=8 or X=9, depending on a value. The IP then moves down to the corresponding right arrow, executing the following code. You can also use this with modulo to test something like a C switch statement. To run it anywhere in the program, you need to change the formula for the x and y coordinates, but other than that, this strategy can work anywhere, and can be used in any direction (by modifying the arrows and rotating). I have a very similar construct posted for Befunge here. BoundedBeans (talk) 01:34, 1 July 2023 (UTC)

@BoundedBeans You used colons instead of periods. Colons will print the character codes of the string instead of the actual string.