home *** CD-ROM | disk | FTP | other *** search
/ Delphi Developer's Kit 1996 / Delphi Developer's Kit 1996.iso / power / acc_obj0 / t_ega_0a.dpr < prev    next >
Encoding:
Text File  |  1995-12-22  |  1.7 KB  |  57 lines

  1. PROGRAM T_ega_0a;                       {Last mod by JFH on 07/20/95}
  2.  
  3. { EXAMPLE OF USING ACCESS OBJECTS }
  4.  
  5. { See notes in U_EGA_0a unit about making the access objects used here.
  6.   I have made other objects in Pascal for accessing WK1 and WQ1 files,
  7.   Obj files, COM ports and servicing the interrupts, DBase files,
  8.   comma-quote-delimited files, formated text reports, long-line text
  9.   files, and anywhere I have an application dependent file structure.
  10.   They are easy to do and very reusable.  As I need them in OP or
  11.   Delphi I am converting them where necessary. }
  12.  
  13. { Pgm. 07/14/95 by John F Herbster, CIS:72714,3445, Houston, TX.
  14.       for Rick Rogers (CIS:74323,3573). }
  15.  
  16. USES
  17.   U_EGA_0a in 'U_EGA_0A.PAS',
  18.   WinCrt;
  19.  
  20. Const InputPath = 'TEST.DXF';
  21.  
  22. VAR
  23.   Reader: tBasicDFXReaderCls;
  24.   Group: integer; s: string; d: double; i: integer; TestNbr: integer;
  25.  
  26. {=====} BEGIN {========================================================}
  27.  
  28.   For TestNbr :=1 to 2 do begin
  29.     Case TestNbr of
  30.       1: begin
  31.         Writeln('Test #',TestNbr,' of simple DXF reader.');
  32.         Reader:=tSimpleDFXReaderCls.Create(InputPath);
  33.         end;
  34.       2: begin
  35.         Writeln('Test #',TestNbr,' of DXF reader with block IO.');
  36.         Reader:=tBlkIoDFXReaderCls.Create(InputPath);
  37.         end;
  38.       end{cases};
  39.     With Reader do begin
  40.       Repeat
  41.         Group:=NextGroupCode;
  42.         If Group>=0
  43.           then begin
  44.             s:=ValStr;
  45.             (*WriteLn(Group:4,' ',s);*)
  46.             end;
  47.         Until Group<0;
  48.       Destroy;
  49.       end;
  50.     WriteLn(Group:4,' (END of test #',TestNbr,')');
  51.     end{TestNbr loop};
  52.  WriteLn('Finished');
  53.  
  54. {=====} END. {=========================================================}
  55.  
  56.  
  57.