summaryrefslogtreecommitdiff
path: root/web/funnelAC/tests/hi02.fw
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /web/funnelAC/tests/hi02.fw
Initial commit
Diffstat (limited to 'web/funnelAC/tests/hi02.fw')
-rw-r--r--web/funnelAC/tests/hi02.fw25
1 files changed, 25 insertions, 0 deletions
diff --git a/web/funnelAC/tests/hi02.fw b/web/funnelAC/tests/hi02.fw
new file mode 100644
index 0000000000..ea4d0c2ac7
--- /dev/null
+++ b/web/funnelAC/tests/hi02.fw
@@ -0,0 +1,25 @@
+HI02: This example shows how FunnelWeb's macro facility can be used to
+ fudge conditionals.
+
+@O@<hi02.out@>==@{
+@<Sloth incrementing loop@>
+@}
+
+@A@<Debug Macro@>
+
+The following macro determines whether debug code will be included in the
+program. All lines of debug code commence with a call to this macro and so
+we can turn all that code on or off here by defining this macro to be either
+empty or the single-line comment symbol (\p{--}). Note the use of a
+quick macro name.
+
+@$@#D@M==@{@} @! Turns the debug code ON.
+@! Use this definition to turn the debug code OFF: @$@#D==@{--@}
+
+
+@$@<Sloth incrementing loop@>==@{@-
+while sloth<walrus loop
+ @#D assert(sloth<walrus,"AWK! sloth>=walrus!!!!!!!");
+ @#D assert(timer<timermax,"AWK! timer>=timermax!!!");
+ inc(sloth);
+end loop@}