execline
Software
www.skarnet.org

The runblock program

runblock's purpose is to help you write execline commands in the execline language. It can only be used inside an execline script. If the script has been given blocks as arguments, runblock allows you to execute one of the blocks individually.

Interface

     runblock [ -P ] [ -n argshift ] [ -r ] n

Example: implementing the ifelse command

Suppose that we want to implement the ifelse command as an execline script, using the ifte command. runblock allows us to do it in a simple way:

 #!/command/execlineb
 ifte { runblock 2 } { runblock -r 2 } runblock 1

That's it.

Credits

The runblock idea, as well as the ifelse idea, comes from Paul Jarc.