All pastes #932401 Raw Edit

Befunge-98 k interpretation

public text v1 · immutable
·published 2008-03-07 18:31 UTC
rendered paste body
A roundup of what current interpreters do with k:

Syntax: first  bit = k executes the instruction at k, not at the instruction
        second bit = k skips over the instruction after executing
        third bit  = 0k doesn't execute the instruction
        fourth bit = all iterations are executed at k

So here I think "1111" means what the spec says.

- !Befunge:     1000 (second bit cancels out fourth so nested k works)
- CCBI:         1110
- JQBF:         0110 (but 2k# jumps once from k?)
- PyFunge beta: 0111
- PyFunge CVS:  0110
- RC/Funge:     1010 (second bit cancels out fourth so nested k works)

The test code I used to figure out the fourth bit, using nested k: 

v                 >"DAB",,,                v
> 7654321 3213kk$7wv                      v>" ",.......a,@
                  >"DAB",,,                ^
                   "                      > "DAB YREV",,,,,,,,a,@
                   >"DOOG",,,,             ^