I'm coding in Befunge, and I wondered how I could make variables. I found that, using p
and g
, you can use your program to store variables. Example:
>&&*11p ...do so
☺ m
@.g11...gnihte
This program asks the user two numbers, multiplies them, and stores the result at the position (1, 1), which is represented by ☺
on the program. It does something, and then gets back the value stored at the top of the stack, and prints it. Then the program stops.
So the question is, do anyone know other ways to save variables on Befunge? I'm interested in discovering and sharing ways to do it.