
Program Asciibox.pax;

Uses CRT;

{ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ}

Procedure Horizontal_Line (HLLC,HLRC,HLR: Integer);
{Puts a  Ansi Horizontal Lines inside Boxes}
{       HLLC = Horizontal Line Left Column  }
{       HLRC = Horizontal Line Right Column }
{       HLR  = Horizontal Line Row          }

Var I : Integer;
Begin
   GotoXY (HLLC,HLR);
   Write ('Ì');
   For I := HLLC+1 to HLRC-1 do
      Write ('Í');
   Write ('¹');
End;
{ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ}

Procedure Vertical_Line (VLTR,VLBR,VLC: Integer);
{Puts a  Ansi Vertiacl Lines inside Boxes}
{       VLTR = Vertical Line Top Row        }
{       VLBR = Vertical Line Bottom Row     }
{       VLC  = Vertical Line Column         }

Var I : Integer;
Begin
   GotoXY (VLC,VLTR);
   Write ('Ë');
   For I := VLTR+1 to VLBR-1 do
      Begin
         GotoXY (VLC,I);
         Write ('º');
      End;
   GotoXY (VLC,VLBR);
   Write ('Ê');
End;
{ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ}

Procedure Intersect_Line (IR,IC: Integer);
{Puts a  Ansi Intersection}
{       IR  = Intersection Row        }
{       IC  = Intersection Column     }

Var I : Integer;
Begin
   GotoXY (IC,IR);
   Write ('Î');
End;
{ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ}

Procedure Box (BULC,BULR,BLRC,BLRR: Integer);
{Puts a Ansi Character BOX on the screen at the specIfIed coordInates}
{       BULC = Box Upper Left Column     }
{       BULR = Box Upper Left Row        }
{       BLRC = Box Lower Right Column    }
{       BLRR = Box Lower Right Row       }

Var I : Integer;
BegIn
   GotoXY (BULC,BULR);
   Write ('É');    // This is a Character #201
   for I := BULC+1 to BLRC-1 do
      Write ('Í');
   Write ('»');
   For I := 1 to BLRR-BULR-1 do
      BegIn
         GotoXY (BLRC,I+BULR);
         Write ('º');
      End;
   GotoXY (BLRC,BLRR);
   Write ('¼');
   For I := BLRC-1 downto BULC+1 do
      BegIn
         GotoXY (I,BLRR);
         Write ('Í');
      End;
   GotoXY (BULC,BLRR);
   Write ('È');
   For I := BLRR-1 downto BULR+1 do
      BegIn
         GotoXY (BULC,I);
         Write ('º');
      End;
End;
{ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ}

Procedure ClearBox (CBULR,CBULC,CBLRR,CBLRC: Integer);
{Clears a Portion of the screen at the specIfIed coordInates}
{       CBULC = Clear Box Upper Left Column     }
{       CBULR = Clear Box Upper Left Row        }
{       CBLRC = Clear Box Lower Right Column    }
{       CBLRR = Clear Box Lower Right Row       }

var R,I : Integer;
BegIn
   For R := CBULR to CBLRR do
      Begin
         GOTOXY (CBULC,R);
         For I := CBULC to CBLRC do
         Write (' ');
      end;
end;

{ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ}
Begin
   Clrscr;
   Box(10,5,40,30);
   Vertical_Line(5,30,25);
   Horizontal_line(10,40,15);
   Intersect_Line(15,25);
End.
{ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ}
