home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 10: Diskmags / nf_archive_10.iso / MAGS / STEN / STEN10.MSA / PROGRAMS / PASCAL / MEGABLAS.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  2010-04-21  |  941 b   |  38 lines

  1. PROGRAM Countdown;
  2.  
  3. {       This program uses the DELAY function in
  4.         Turbo Pascal to set a delay time of 1000
  5.         miliseconds (1 second) between displaying
  6.         numbers for a 'rocket launch sequence'.
  7.         Written by Roy McPartland, ace space-
  8.         fighter vehicle type thingie commander,
  9.         15/10/91.  Saved on disk as MEGABLAS.PAS     }
  10.  
  11. USES
  12.     CRT;
  13.  
  14. VAR
  15.     Number  : Integer;
  16.  
  17. BEGIN {Main Program};
  18.     CLRSCR;
  19.     WRITELN ('What number do you want to countdown from?');
  20.     READLN (Number);
  21.     CLRSCR;
  22.     GOTOXY (30,11);
  23.     WRITELN ('T minus ',Number,' seconds');
  24.     REPEAT
  25.     Number := Number - 1;
  26.     DELAY (1000);
  27.     GOTOXY (30,11);
  28.     WRITELN ('T minus ',Number,' seconds ');
  29.     UNTIL  (Number = 0);
  30.     GOTOXY (32,13);
  31.     WRITELN ('=============');
  32.     GOTOXY (32,14);
  33.     WRITELN ('Lift Off!!!!!');
  34.     GOTOXY (32,15);
  35.     WRITELN ('=============');
  36. END.
  37.  
  38. ə