home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_02_06 / 2n06044a < prev    next >
Text File  |  1991-04-17  |  993b  |  25 lines

  1. Figure 4: Simple Pascal Procedure
  2.  
  3.    procedure Initialize;
  4.    { Initialize the video mode, LastCol, LastRow, and the random number }
  5.    { generator. Paint the help line. }
  6.    begin
  7.      CheckBreak:=False;                   { turn off Contrl-C checking }
  8.      OrigMode:=LastMode;                  { Remember original video mode }
  9.      TextMode(Lo(LastMode)+Font8x8);      { use 43 or 50 lines on EGA/VGA }
  10.      LastCol:=Lo(WindMax)+1;              { get last column, row }
  11.      LastRow:=Hi(WindMax)+1;
  12.      GoToXY(1,LastRow);                   { put message line on screen }
  13.      TextBackground(Black);
  14.      TextColor(White);
  15.      Write(' Ins-InsLine  ',
  16.            'Del-DelLine  ',
  17.            #27#24#25#26'-Cursor  ',
  18.            'Alt-W-Window  ',
  19.            'Alt-R-Random  ',
  20.            'Esc-Exit');
  21.      Dec(LastRow,80 div LastCol);         { don't write on message line }
  22.      Randomize;                           { init random number generator }
  23.    end; { Init }
  24.  
  25.