home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / program / compiler / vici_102 / examples / listtest.e < prev    next >
Text File  |  1993-03-02  |  397b  |  36 lines

  1. class listtest
  2. feature
  3.   l: list;
  4.  
  5.   create is
  6.   local
  7.      p,q: list;
  8.      i: integer
  9.   do
  10.     l.create(0);
  11.     --l.put(0);
  12.  
  13.     from i:=1; q:=l
  14.     until i>4
  15.     loop
  16.       p.create(i);
  17.       --p.put(i);
  18.       q.add(p);
  19.       q:=p;
  20.  
  21.       i:=i+1
  22.     end;
  23.  
  24.     from p:=l
  25.     until p.void
  26.     loop
  27.       io.putint(p.item);
  28.       p:=p.next
  29.     end;
  30.  
  31.   end
  32.  
  33. end
  34.  
  35.  
  36.