Debian Codegraph @

tests/hi03.fw

raw
1 HI03: This example shows how FunnelWeb's macro facility can be used to
2 fudge conditionals. This method is different to HI02.
3
4 @O@<hi03.out@>==@{
5 @<Sloth incrementing loop@>
6 @}
7
8 @A@<Debug Macro@>
9
10 The following macro determines whether debug code will be included in the
11 program. All debug code is wrapped by a call to this macro and so
12 we can turn all the debug code on or off here by defining this macro to be
13 either empty or its parameter.
14
15 @$@#D@(@1@)@M==@{@1@} @! Turns the debug code ON.
16 @! Use this definition to turn the debug code OFF: @$@#D@(@1@)==@{@}
17
18
19
20 @$@<Sloth incrementing loop@>==@{@-
21 while sloth<walrus loop
22 @#D@(assert(sloth<walrus,"AWK! sloth>=walrus!!!!!!!");
23 assert(timer<timermax,"AWK! timer>=timermax!!!");@)
24 inc(sloth);
25 end loop@}