Category : Files from Magazines
Archive   : ITP9007.ZIP
Filename : PRINTDBF.PAS

 
Output of file : PRINTDBF.PAS contained in archive : ITP9007.ZIP
{================================================
= PROGRAM: PRINTDBF.PAS =
= PURPOSE: Print listings of Dbase III+/IV =
= DBF files =
================================================}

{------------------------------------------------
Initialize variables and create types -
-----------------------------------------------}

USES Crt, dBASE;

VAR
DFile : DbfFile;
ActionHdr : Byte;
ActionFile : Boolean;

PROCEDURE Beep;
BEGIN
Sound(1000);Delay(500);NoSound
END;

{------------------------------------------------
- Main processing loop -
-----------------------------------------------}

BEGIN
ClrScr;
DFile := DbfOpen('PLANETS.DBF');
WriteLn;
ActionHdr := DbfReadHdr(DFile);
CASE ActionHdr OF
1 : BEGIN
Beep;
WriteLn('Not a dBASE III+ or IV file.')
END;
3 : BEGIN
Beep;
WriteLn('Error reading dBASE file.')
END
ELSE
BEGIN
DbfDispHdr(DFile);
Pause;
ActionFile := DbfReadStru(DFile);
CASE ActionFile OF
TRUE :
BEGIN
ClrScr;
DbfDispStru(DFile);
Pause;
IF ActionHdr <> 2 THEN
BEGIN
ClrScr;
DbfList(DFile);
Pause
END
ELSE
BEGIN
ClrScr;
WriteLn('No records to print')
END
END;
FALSE :
BEGIN
Beep;
WriteLn('Field information error')
END
END {Case ActionFile}
END; {Case ActionHdr}
ActionFile := DbfClose(DFile);
END
END.


  3 Responses to “Category : Files from Magazines
Archive   : ITP9007.ZIP
Filename : PRINTDBF.PAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/