home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / TEKST / FUNNEL_S / TESTS / HI02.FW < prev    next >
Text File  |  1992-05-27  |  794b  |  26 lines

  1. HI02: This example shows how FunnelWeb's macro facility can be used to
  2.       fudge conditionals.
  3.  
  4. @O@<hi02.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 lines of debug code commence with a call to this macro and so
  12. we can turn all that code on or off here by defining this macro to be either
  13. empty or the single-line comment symbol (\p{--}). Note the use of a
  14. quick macro name.
  15.  
  16. @$@#D@M==@{@}     @! Turns the debug code ON.
  17. @! Use this definition to turn the debug code OFF: @$@#D==@{--@}
  18.  
  19.  
  20. @$@<Sloth incrementing loop@>==@{@-
  21. while sloth<walrus loop
  22.    @#D assert(sloth<walrus,"AWK! sloth>=walrus!!!!!!!");
  23.    @#D assert(timer<timermax,"AWK! timer>=timermax!!!");
  24.    inc(sloth);
  25. end loop@}
  26.