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 / PROGRAMS / SPREDSHT / QSOLVE11.LBR / QS3.IZC / QS3.INC
Text File  |  2000-06-30  |  2KB  |  103 lines

  1.  
  2. procedure LeftCol;
  3. begin
  4.   if Col>1 then
  5.   begin
  6.     Col:=Col-1;
  7.     if Col<CC then
  8.     begin
  9.       CC:=CC-1;
  10.       ShowBorder;
  11.       ShowCells;
  12.     end;
  13.   end;
  14. end;
  15.  
  16. procedure LeftPage;
  17. begin
  18.   CC:=CC-Pred(CLeft);
  19.   if CC<1 then CC:=1;
  20.   Temp:=CC+Pred(CRight);
  21.   if Temp<Col then Col:=Temp;
  22.   ShowBorder;
  23.   ShowCells;
  24. end;
  25.  
  26. procedure RightCol;
  27. begin
  28.   if Col<26 then
  29.   begin
  30.     Col:=Col+1;
  31.     if Col>CC+Pred(CRight) then
  32.     begin
  33.       while (CC+Pred(CRight)<Col) do CC:=Succ(CC);
  34.       ShowBorder;
  35.       showCells;
  36.     end;
  37.   end;
  38. end;
  39.  
  40. procedure RightPage;
  41. var
  42.   T: integer;
  43. begin
  44.   CC:=CC+CRight;
  45.   Temp:=CC;
  46.   CC:=27;
  47.   T:=CLeft;
  48.   CC:=Temp;
  49.   if CC>28-T then CC:=28-T;
  50.   if Col<CC then
  51.     Col:=CC;
  52.   ShowBorder;
  53.   ShowCells;
  54. end;
  55.  
  56. procedure UpRow;
  57. begin
  58.   if Row>1 then
  59.   begin
  60.     Row:=Row-1;
  61.     if Row<CR then
  62.     begin
  63.       CR:=CR-1;
  64.       ShowBorder;
  65.       showCells;
  66.     end;
  67.   end;
  68. end;
  69.  
  70. procedure UpPage;
  71. begin
  72.   CR:=CR-21;
  73.   Row:=Row-21;
  74.   if Row<1 then Row:=1;
  75.   if CR<1 then CR:=1;
  76.   ShowBorder;
  77.   ShowCells;
  78. end;
  79.  
  80. procedure DownRow;
  81. begin
  82.   if Row<99 then
  83.   begin
  84.     Row:=Row+1;
  85.     if Row>CR+20 then
  86.     begin
  87.       CR:=CR+1;
  88.       ShowBorder;
  89.       showCells;
  90.     end;
  91.   end;
  92. end;
  93.  
  94. procedure DownPage;
  95. begin
  96.   CR:=CR+21;
  97.   Row:=Row+21;
  98.   if Row>99 then Row:=99;
  99.   if CR>79 then CR:=79;
  100.   ShowBorder;
  101.   ShowCells;
  102. end;
  103.