IsCurrentDeleted returns a non-zero value (1) if the last read record is marked as deleted.
You have to read a record with ReadRecord before using IsCurrentDeleted.
var
dbf :integer;
r, x :integer;
begin
dbf := OpenBase( 'filename.dbf' );
if dbf <> 0 then
begin
x := 0;
for r := 0 to RecCount(dbf)-1 do
begin
ReadRecord(dbf, r);
if IsCurrentDeleted(dbf) then
x := x + 1;
end;
showmessage( inttostr(x) + ' deleted records.' );
CloseBase(dbf);
end;
end.