Substitute of format directive

Delphi & Pascal (česká wiki)
Přejít na: navigace, hledání
Category: KMP (Club of young programmers)

Author: Ján Benkovič
web: www.tbteacher.host.sk

Program: Format.pas
File exe: Format.exe

Substitute of format directive. Fortunately only for joke. Your harddisk are stay OK.
{ FORMAT.PAS                             Copyright (c) Jan Benkovic }
{ Vtipna nahrada prikazu format. Nastastie len vystrasi, vas disk   }
{ zostane v poriadku.                                               }
{                                                                   }
{ Datum:01.02.1997                             http://www.trsek.com }
 
uses crt;
 
var i,whey:integer;
 
begin
  writeln;
  writeln('WARNING: ALL DATA ON NON-REMOVABLE DISK');
  writeln('DRIVE C: WILL BE LOST!');
  write('Proceed with Format (Y/N)?');
  readkey;
  writeln('y');
  writeln;
  whey:=wherey;
 
  for i:=0 to 100 do begin
    gotoxy(1,whey);
    write(i,' percent completed.');
  end;
 
  gotoxy(1,whey);
  writeln('Format complete.            ');
  writeln;
  delay(1000);
 
  repeat
    writeln('Hardware failure Drive C.');
    write('Abort, Retry, Fail?');
    writeln(readkey);
    writeln;
  until false;
end.