home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / DATABASE / DO1BETA.ZIP / FILETEST.DO < prev    next >
Text File  |  1991-07-25  |  605b  |  19 lines

  1. /*
  2.     this is a demonstration of dObject's file handling
  3.     capabilities
  4. */
  5. #include "iodef.do" % this file contains constant definitions for IO
  6. /*
  7.     the call to new(File...) specifys:
  8.         filename
  9.         open mode (access and sharing modes)
  10.         attributes (if 0 then it is set to FA_NORMAL)
  11.         creation (actions if file exists or if file does not exist)
  12.     look in iodef.do for constant definitions for these arguments
  13. */
  14. f = new(File,"new.out",FM_ACCESS_WO,FA_NORMAL,CR_EX_REPLACE+CR_NOEX_CREATE);
  15. writeDevice(f);
  16. ? "this is a test";
  17. close(f);
  18. ? "the contents of new.out are:\n",fileString("new.out");
  19.