home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lclint.zip / lclint-2_3h-os2-bin.zip / test / iter.c < prev    next >
Text File  |  1997-09-03  |  720b  |  35 lines

  1. # include "iter.h"
  2.  
  3. int test (void)
  4. {
  5.   char c;
  6.   int i;
  7.   int *a;
  8.  
  9.   intFor(2,5,x,z) /* 2. Unrecognized identifier: x */
  10.     {
  11.       printf("%d\n", z);
  12.     } end_intFor;
  13.  
  14.   intFor(2,c,x,i) /* 3. Yield parameter shadows local declaration: i 
  15.              5. Iter intFor expects arg 2 to be int gets char: c */
  16.     {
  17.       ;
  18.     } ; /* 4. Iter intFor not balanced with end_intFor */
  19.  
  20.   intFor(2, 12, x, i+3) /* 6, 7. Variable i used before definition
  21.                      Yield parameter is not simple identifier: i + 3 */
  22.     {
  23.       ;
  24.     } end_arrayElements; /* 8. Iter intFor not balanced with end_intFor: end_arrayElements */
  25.  
  26.   arrayElements(1, 10, a, el)
  27.     {
  28.       printf("%d\n", el);
  29.     } end_arrayElements;
  30.   return 3;
  31. }
  32.  
  33.  
  34.  
  35.