Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>fcreate()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
FCREATE()


Syntax:     FCREATE(<expC> [,<expN>])

Purpose:    To create a new file or truncate an existing file to zero
            length.

Arguments:  <expC> is the name of the file to create.

            <expN> is the DOS file attribute.  If omitted, the
            default is zero.


            Table: DOS File Attributes
            ------------------------------------------------------------
            Value Attribute   Description
            ------------------------------------------------------------
            0     Normal      Read/write
            1     Read only   Attempting to open for output returns an
                              error
            2     Hidden      Excluded from normal directory searches
            4     System      Excluded from normal directory searches
            ------------------------------------------------------------

Returns:    A numeric value.

            FCREATE() returns the DOS file handle number of the new file
            in the range of zero to 65,535.  If an error occurs, it
            returns -1.

Usage:      When FCREATE() successfully creates a new file, it is left
            open with a DOS open mode of 2 (mode 2 is compatibility
            sharing mode, read/write access mode).

            Since a file handle is required in order to identify an open
            file to other file functions, always assign the return value
            from FCREATE() to a memory variable for later use.

            Accessing files in other directories: FCREATE() does not
            obey either the DEFAULT or PATH SETtings.  Instead, it
            writes to the current directory unless a path is explicitly
            stated.

Library:    EXTEND.LIB

            Warning: These functions allow low level access to DOS
            files and devices.  They should be used with extreme care
            and require a thorough knowledge of the operating system.


----------------------------------- Example --------------------------------

   handle = FCREATE("Testfile", 0)




See Also: FCLOSE() FERROR() FOPEN()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson