Program News;

TYPE
    Titles   = string[79];

VAR
    m,x       : integer;

PROCEDURE Border (x1,y1,x2,y2:Integer; Title: Titles);
BEGIN
  Window (x1,y1,x2,y1+1);
  Gotoxy(1,1);
  x := x2-x1;
  Write('É');
  IF length(title) > x THEN title[0] := chr(x-4);
  Write(title);
  FOR m := x1 + length(title)+1 to x2-1 DO Write('Í');
  Write('»');
  FOR m := 2 to y2-y1 DO
    BEGIN
      Window(x1,y1,x2,y1+m+1);
      Gotoxy(1,m);
      Write ('º');
      Gotoxy(x2-x1+1,m);
      Write ('º');
    END;
  Window(x1,y1,x2,y2+1);
  Gotoxy(1,y2-y1+1);
  Write('È');
  FOR m := x1+1 to x2-1 DO Write('Í');
  Write('¼');
END;
{==============================================}
PROCEDURE Box (x1,y1,x2,y2:integer; title: Titles);
BEGIN
  Border(x1,y1,x2,y2,title);
  Window(x1+1,y1+1,x2-1,y2-1);
  Clrscr;
END;
{================================================}
BEGIN
Box (4,1,66,5,' Box 1 ');
Gotoxy(1,2);
Write('Would you like to put windows in your TURBO PASCAL programs?');
Delay(2000);
Box (1,8,25,14,' Box 2 ');
Gotoxy(3,3);
Write ('It is quite simple.');
Delay(2000);
Box (26,8,79,14,' Box 3 ');
Gotoxy(3,3);
Write('  All you have to do is list this program.');
Delay(2000);
Box (1,15,79,24,' Box 4 ');
Gotoxy(1,4);
Write('The subroutine that generates these windows can be copied into your program.');
Delay(3500);
Box (10,10,70,15,'ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FIFTH BOX ');
Writeln;
Write('            That is all there is to it!!');
Gotoxy(1,3);
Delay(3000);
Writeln;
Write('    Courtesy of J. Levitt, Fargo IBM-PC Users Group');
Delay(3000);
Box (12,17,68,20,'ÍÍÍÍÍÍÍÍÍÍÍÍ Final Box  ');
Writeln;
Write('                  Press any key to end');
Repeat
Until keypressed;
Delay(400)
END.


Í Final Box  ');
Writeln;
Write