home *** CD-ROM | disk | FTP | other *** search
- /*
- this is a demonstration of dObject's file handling
- capabilities
- */
- #include "iodef.do" % this file contains constant definitions for IO
- /*
- the call to new(File...) specifys:
- filename
- open mode (access and sharing modes)
- attributes (if 0 then it is set to FA_NORMAL)
- creation (actions if file exists or if file does not exist)
- look in iodef.do for constant definitions for these arguments
- */
- f = new(File,"new.out",FM_ACCESS_WO,FA_NORMAL,CR_EX_REPLACE+CR_NOEX_CREATE);
- writeDevice(f);
- ? "this is a test";
- close(f);
- ? "the contents of new.out are:\n",fileString("new.out");
-