home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / elan / demo / showasc.eln < prev    next >
Text File  |  1987-11-26  |  2KB  |  85 lines

  1. program:
  2.   LET columns = 16;
  3.   INT VAR i, j;
  4.   FOR i FROM 0 UPTO columns
  5.   REP
  6.     topline;
  7.     head;
  8.     sepline;
  9.     FOR j FROM 0 UPTO 15
  10.     REP entry
  11.     ENDREP;
  12.     baseline
  13.   ENDREP.
  14.  
  15.   topline:
  16.     IF i = 0
  17.     THEN
  18.       cursor (1, 2);
  19.       put (""201"" + 4 * ""205"")
  20.     ELIF i = columns
  21.     THEN
  22.       cursor (4 * i + 2, 2);
  23.       put (""187"")
  24.     ELSE
  25.       cursor (4 * i + 2, 2);
  26.       put (""209"" + 3 * ""205"")
  27.     FI.
  28.  
  29.   head:
  30.     IF i = 0
  31.     THEN
  32.       cursor (1, 3);
  33.       put (""186"" + 4 * ""219"")
  34.     ELIF i = columns
  35.     THEN
  36.       cursor (4 * i + 2, 3);
  37.       put (""186"")
  38.     ELSE
  39.       cursor (4 * i + 2, 3);
  40.       put (""179"" + text (16 * i, 3))
  41.     FI.
  42.  
  43.   sepline:
  44.     IF i = 0
  45.     THEN
  46.       cursor (1, 4);
  47.       put (""204"" + 4 * ""205"")
  48.     ELIF i = columns
  49.     THEN
  50.       cursor (4 * i + 2, 4);
  51.       put (""185"")
  52.     ELSE
  53.       cursor (4 * i + 2, 4);
  54.       put (""216"" + 3 * ""205"")
  55.     FI.
  56.  
  57.   entry:
  58.     IF i = 0
  59.     THEN
  60.       cursor (1, 5 + j);
  61.       put (""186"" + text (j, 3))
  62.     ELIF i = columns
  63.     THEN
  64.       cursor (4 * i + 1, 5 + j);
  65.       put (" "186"")
  66.     ELSE
  67.       cursor (4 * i + 1, 5 + j);
  68.       put (" "179" " + ascii (16 * i + j))
  69.     FI.
  70.  
  71.   baseline:
  72.     IF i = 0
  73.     THEN
  74.       cursor (1, 5 + 16);
  75.       put (""200"" + 4 * ""205"")
  76.     ELIF i = columns
  77.     THEN
  78.       cursor (4 * i + 2, 5 + 16);
  79.       put (""188"")
  80.     ELSE
  81.       cursor (4 * i + 2, 5 + 16);
  82.       put (""207"" + 3 * ""205"")
  83.     FI.
  84.  
  85.