home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / TURBOM2 / BOXDEMO.LBR / BOXTEST.MOD < prev   
Text File  |  2000-06-30  |  1KB  |  43 lines

  1. module boxtest;
  2. from boxlib import coordinate, boxtype, InitBox, SetBox, DrawBox, Clear, At;
  3. from terminal import writestring, writeln, readchar;
  4.  
  5. procedure Pause;
  6. var
  7.     dummy : char;
  8. begin
  9.     writestring ('Strike any key when ready');
  10.     readchar (dummy);
  11.     writeln;
  12. end Pause;
  13.  
  14. procedure DrawBoxes;
  15. const
  16.     minlen = 22;
  17.     minwidth = 62;
  18. var
  19.     i : integer;
  20.     position : coordinate;
  21. begin
  22.     for i := 1 to 5 do
  23.         position.column := 11 + 4*i;
  24.         position.row := 2*i;
  25.         DrawBox (minlen-4*i, minwidth-8*i, position);
  26.         end;
  27. end DrawBoxes;
  28.  
  29. begin
  30.     InitBox;        (* Initialize for Box Processing *)
  31.     SetBox (NARROW);    (* Edges of Box are NARROW or WIDE *)
  32.     Clear;            (* Clear Screen *)
  33.     DrawBoxes;        (* Draw a Bunch of Boxes *)
  34.     At (22,1);        (* Position Cursor for Little Finish *)
  35.     Pause;            (* Wait for User Input *)
  36.     Clear;            (* Clear Screen *)
  37.     SetBox (WIDE);        (* Edges of Box are NARROW or WIDE *)
  38.     DrawBoxes;        (* Draw a Bunch of Boxes *)
  39.     At (22,1);        (* Position Cursor for Big Finish *)
  40.     Pause;            (* Wait for User Input *)
  41.     At (22,1);
  42. end boxtest.
  43.