home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / program / language / grs / g / lists < prev    next >
Encoding:
Text File  |  1991-03-04  |  620 b   |  36 lines

  1. let string s := "{((listof listof string) expression) expression llsee;};";
  2.  
  3. exec(compile(s));
  4.  
  5. assume ((listof listof string) expression) expression llsee in
  6. {
  7.    llsee := {{[["Hello","World"],["and","how","are you?"]]}};
  8.  
  9.    (listof listof string) expression llse;
  10.  
  11.    llse := eval(llsee);
  12. };
  13.  
  14. listof listof string lls;
  15.  
  16. lls := eval(llse);
  17.            
  18. listof string ls;
  19.            
  20. let string indent := "";
  21.  
  22.  
  23. loop
  24.    exiton (lls = []);
  25.    ls := head(lls);
  26.    loop
  27.       exiton(ls = []);
  28.       write(indent,head(ls),"\n");
  29.       ls := tail(ls);
  30.       indent := indent + " ";
  31.    endloop;
  32.    lls := tail(lls);
  33. endloop;
  34.  
  35.  
  36.