From f316a2ed52195135a35e32d7096e876357c48c69 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 18 Sep 2014 20:03:23 +0000 Subject: initial commit: rc for execline-2.0.0.0 --- doc/runblock.html | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 doc/runblock.html (limited to 'doc/runblock.html') diff --git a/doc/runblock.html b/doc/runblock.html new file mode 100644 index 0000000..6f5386e --- /dev/null +++ b/doc/runblock.html @@ -0,0 +1,75 @@ + + + + + execline: the runblock program + + + + + + +

+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. +

+ + + -- cgit v1.3.1