home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 2
/
ctrom_ii_b.zip
/
ctrom_ii_b
/
PROGRAM
/
PASCAL
/
TPDB32
/
ZAP.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1991-10-28
|
2KB
|
55 lines
{$A+,B+,D-,E-,F-,I-,L-,N-,O-,R-,S-,V-}
{$M 65520,0,655360}
program ZapFile;
(***********************************)
(* TPDB *)
(***********************************)
(* Object -Oriented *)
(* Turbo Pascal 6.0 Units *)
(* for Accessing dBASE III *)
(* files. *)
(* Copyright 1991 *)
(* Brian Corll *)
(* All Rights Reserved *)
(* dBASE is a registered *)
(* trademark of Ashton-Tate, Inc. *)
(* Version 3.20 October, 1991 *)
(***********************************)
(* Portions Copyright 1984,1991 *)
(* Borland International Corp. *)
(***********************************)
uses
Crt, TPDB, TPDBScrn, TPDBStr;
var
Message: string [80];
Zapper:^DBF;
begin
CursorOff;
if ParamCount = 0 then begin
Beep;
ClrScr;
Flash(1, 1, LightGreen + BlackBG, 'ZAP filename.dbf');
CursorOn;
Halt(1);
end;
New(Zapper, Init(ParamStr(1)));
if Zapper^.TotalRecs = 0 then begin
ClrScr;
Beep;
Message := 'Record count in file ' + Upper(ParamStr(1)) + ' is already ZERO.';
Flash(1, 1, LightGreen + BlackBG, Message);
CursorOn;
Halt(1);
end;
Zapper^.Zap;
Zapper^.Done;
ClrScr;
FlashC(12, White + BlackBG, 'File has been zapped.');
FlashC(13, LightGreen + BlackBG, 'Copyright 1991 Brian Corll');
CursorOn;
end.