Language::Befunge::lib::SUBR - subroutines extension
version 5.000
The SUBR fingerprint (0x53554252) allows to use subroutines within befunge.
Create a new SUBR instance.
Pop a $vector from the stack, and jump inconditionally to this location. The velocity will be forced to (1,0) (or the equivalent for other dimensions).
$vector
Call a subroutine. In details, pop a $count and a $vector from the stack. Then pop $count elements from the stack, push current position, current velocity and the $count elements popped back on the stack. Then jump to the $vector address with a velocity of (1,0) (or the equivalent for other dimensions). This function is supposed to be called in conjunction with R.
$count
R
Return from subroutine (supposed to be called after a call to C). Pop a $count from the stack, then $count elements from the stack. Pop then 2 vectors, and push back the $count elements on the stack. Then restore the velocity from the first vector popped, and jump back to address it went from (the second vector popped).
C
Function C and J pop a vector from the stack to jump to this address. However, the vector popped can be either absolute or relative to the storage offset. Default mode is absolute addressing, but one can switch with the following functions:
J
Switch in absolute mode.
Switch in relative mode.
http://www.rcfunge98.com/rcsfingers.html#SUBR.
Jerome Quelin
This software is copyright (c) 2003 by Jerome Quelin.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Language::Befunge, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Language::Befunge
CPAN shell
perl -MCPAN -e shell install Language::Befunge
For more information on module installation, please visit the detailed CPAN module installation guide.