5 ms·
That's an interesting addition to the language, since the numeric "labels" are effectively pointers that can be changed anywhere in the program! Though from rea
by rep_lodsb 2y ago
That's an interesting addition to the language, since the numeric "labels" are effectively pointers that can be changed anywhere in the program! Though from reading the interpreter code, it seems like it doesn't handle "nested" procedures that can (re)define other procedures or themselves, which could make this a lot more powerful.
Never done enough BF programming to come up with a good example, but I'm thinking about something like this:
( (<-)<+ )
On the first call it increments it argument, then decrements on subsequent calls. There could also be a loop that switches a procedure between one of several definitions, which could be used to implement a state machine.