In Befunge-98, the k
operator allows me to do this
1k12....@
The output of this will be 2110
. I am looking for a (short) way to iterate multiple instructions, e.g. I want the output to be 2121
– as if the k
operator iterated 12
twice, not just the 1
.
Is there any way to get the k
operator to do this? If not, what would be the shortest way to repeat a sequence n
times – without using p
, g
and _
or |
?
I don't think it's possible, because it would have to stop iterating after a certain point, and to do that it would need to use _ or |, or p to put, for example, a ^ to send the pointer out of the loop.
You could use w to exit from the loop, but I assume that since you don't want _ or |, that w is not allowed either.