home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / UTILITY / SYSTEM / GETTIME.ZIP / SETPARM.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1990-12-10  |  1.4 KB  |  57 lines

  1. program setparm;
  2. uses crt, ioerrmsg;
  3. var
  4.     parmfile: text;
  5.     timezone: 0..23;
  6.     comport: 1..2;
  7.     dialcmd: string[80];
  8.     resetcmd: string[80];
  9.  
  10. procedure check_io;
  11. var i: integer;
  12. begin
  13.   i := IOresult;
  14.   if i<> 0 then begin
  15.      writeln('I/O error #',i, ' on PARMFILE: ', errmsg(i));
  16.      halt;
  17.   end;
  18. end;
  19.  
  20. begin
  21.   ClrScr;
  22.   {$I-}
  23.   assign(parmfile,'parmfile');
  24.   check_io;
  25.   rewrite(parmfile);
  26.   check_io;
  27.   {$I+}
  28.   writeln ('Enter time zone from Greenwich Mean Time: ');
  29.   writeln (' 4 - Eastern Daylight');
  30.   writeln (' 5 - Eastern Standard or Central Daylight');
  31.   writeln (' 6 - Central Standard or Mountain Daylight');
  32.   writeln (' 7 - Mountain Standard or Pacific Daylight');
  33.   writeln (' 8 - Pacific Standard');
  34.   write (':');
  35.   readln (timezone);
  36.   write('Enter communication port, 1 or 2: ');
  37.   readln(comport);
  38.   write('Enter modem reset command (default: "ATZ"): ');
  39.   readln(resetcmd);
  40.   if resetcmd = '' then resetcmd := 'ATZ';
  41.   writeln ('Enter dial command for Naval Observatory');
  42.   write  (' (default: "ATDT2026530351"): ');
  43.   readln (dialcmd);
  44.   if dialcmd = '' then dialcmd := 'ATDT2026530351';
  45.   {$I-}
  46.   writeln(parmfile, timezone);
  47.   check_io;
  48.   writeln(parmfile, comport);
  49.   check_io;
  50.   writeln(parmfile, resetcmd);
  51.   check_io;
  52.   writeln(parmfile, dialcmd);
  53.   check_io;
  54.   close(parmfile);
  55.   check_io;
  56. end.
  57.