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.lis < prev    next >
File List  |  1992-05-27  |  2KB  |  51 lines

  1. FUNNELWEB LISTING FILE
  2. ======================
  3.  
  4.  
  5. Global Local| Input File
  6. ------------+-------------------------------------------------------------------
  7.      1     1| EX03: An example containing errors to do with the number of times
  8.      2     2|       that macros are called.
  9.      3     3| 
  10.      4     4| @O@<ex03.out@>==@{@-
  11.      5     5| @<Include Files@>
  12.      6     6| @<Include Files@>
  13.      7     7| @<Main Program@>
  14.      8     8| @}
  15.      9     9| 
  16.     10    10| @$@<Main Program@>==@{@-
  17.     11    11| main()
  18.     12    12| {
  19.     13    13|  doit();
  20.     14    14| }
  21.     15    15| @}
  22.     16    16| 
  23.     17    17| @$@<Subroutine@>==@{@-
  24.        Error|.^This macro is never used (and has no @Z).
  25.     18    18| void doit()
  26.     19    19| {
  27.     20    20|  int i;
  28.     21    21|  for (i=0;i<10;i++)
  29.     22    22|    {
  30.     23    23|     @<Print@>
  31.     24    24|     @<Print@>
  32.     25    25|    }
  33.     26    26| }@}
  34.     27    27| 
  35.     28    28| @$@<Print@>==@{@-
  36.        Error|.^This macro is used more than once (and has no @M).
  37.     29    29| printf("Hello World!");
  38.     30    30| printf("\n");@}
  39.     31    31| 
  40.     32    32| @$@<Scan@>==@{scanf@}
  41.        Error|.^This macro is never used (and has no @Z).
  42.     33    33| 
  43.     34    34| @$@<Include Files@>==@{@-
  44.        Error|.^This macro is used more than once (and has no @M).
  45.     35    35| #include <stdio.h>
  46.     36    36| #include <stdlib.h>@}
  47.             | <End-Of-File>
  48. ------------+-------------------------------------------------------------------
  49.  
  50. There were 4 Errors.
  51.