home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / f / funnel-x.zip / examples / ex03.fw < prev    next >
Text File  |  1992-05-27  |  481b  |  37 lines

  1. EX03: An example containing errors to do with the number of times
  2.       that macros are called.
  3.  
  4. @O@<ex03.out@>==@{@-
  5. @<Include Files@>
  6. @<Include Files@>
  7. @<Main Program@>
  8. @}
  9.  
  10. @$@<Main Program@>==@{@-
  11. main()
  12. {
  13.  doit();
  14. }
  15. @}
  16.  
  17. @$@<Subroutine@>==@{@-
  18. void doit()
  19. {
  20.  int i;
  21.  for (i=0;i<10;i++)
  22.    {
  23.     @<Print@>
  24.     @<Print@>
  25.    }
  26. }@}
  27.  
  28. @$@<Print@>==@{@-
  29. printf("Hello World!");
  30. printf("\n");@}
  31.  
  32. @$@<Scan@>==@{scanf@}
  33.  
  34. @$@<Include Files@>==@{@-
  35. #include <stdio.h>
  36. #include <stdlib.h>@}
  37.