home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD 24 / PCPLUS115.iso / install / extern.pak / DBFILE.PRG < prev    next >
Encoding:
Text File  |  1994-08-02  |  2.4 KB  |  75 lines

  1. *******************************************************************************
  2. *  PROGRAM:      dbfile.prg
  3. *
  4. *  WRITTEN BY:   Borland Samples Group.
  5. *
  6. *  DATE:         1/94
  7. *
  8. *  UPDATED:      3/94
  9. *
  10. *  VERSION:      Field Test March 94
  11. *
  12. *  DESCRIPTION:  Part of the dbfile example. 
  13. *                See the file dbfile.cpp for a complete description.
  14. *                The dbgrep.prg and dbsysdrv.prg programs show how the
  15. *                dbfile system can be used.
  16. *
  17. *  PARAMETERS:   None
  18. *
  19. *  CALLS:        To dbfile.dll
  20. *
  21. *  USAGE:        This program is not meant to be run stand alone, but by
  22. *                adding the following 2 lines in a program you get full
  23. *                access to the textfile class:
  24. *
  25. *                SET PROC to dbfile ADDITIVE
  26. *                DO dbfile
  27. *
  28. *******************************************************************************
  29.  
  30. * Be quiet.
  31. SET talk off
  32.  
  33. *
  34. *  Definition of the textfile class.  Usage of this class requires
  35. *  dbfile.dll to be on your search path.
  36. *
  37.  
  38. * TFinit is called once to set up the class.
  39. EXTERN CLONG TFinit()                          dbfile.dll
  40.  
  41. * These are  the functions that are available.
  42. EXTERN CLOGICAL TFclose()                      dbfile.dll
  43. EXTERN CLOGICAL TFeof()                        dbfile.dll
  44. EXTERN CLOGICAL TFerror()                      dbfile.dll
  45. EXTERN CLOGICAL TFfieldseparator( CSTRING )    dbfile.dll
  46. EXTERN CLOGICAL TFfilter( CSTRING )            dbfile.dll
  47. EXTERN CSTRING  TFgeterror()                   dbfile.dll
  48. EXTERN CSTRING  TFgetfield( CWORD )            dbfile.dll
  49. EXTERN CSTRING  TFgetline()                    dbfile.dll
  50. EXTERN CLOGICAL TFlineseparator( CSTRING )     dbfile.dll
  51. EXTERN CLOGICAL TFopen( CSTRING )              dbfile.dll
  52. EXTERN CVOID    TFrelease()                    dbfile.dll
  53. EXTERN CWORD    TFgetrec()                     dbfile.dll
  54.    
  55. CLASS textfile
  56.  
  57.    * Call the DLL to set up all the details.
  58.    this.mystruct       = TFinit()
  59.  
  60.    * Initialize the memberfunctions.
  61.    this.close          = TFclose
  62.    this.eof            = TFeof
  63.    this.error          = TFerror
  64.    this.fieldseparator = TFfieldseparator
  65.    this.filter         = TFfilter
  66.    this.geterror       = TFgeterror
  67.    this.getfield       = TFgetfield
  68.    this.getline        = TFgetline
  69.    this.lineseparator  = TFlineseparator
  70.    this.open           = TFopen
  71.    this.release        = TFrelease
  72.    this.getrec         = TFgetrec
  73.  
  74. ENDCLASS
  75.