Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FUNCky - <b>name:</b> <b>fcreatef() - dos 3.00 create file function</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     fcreatef() - DOS 3.00 create file function
  Usage:    <integer> = fcreatef(<filename>,[<attrib>])
  Params:   string <filename> - file to create
            integer <attrib> - optional, attribute to use when
            opening the file, default is 0. Valid attributes are:

                 0    -    normal
                 1    -    read only
                 2    -    hidden
                 4    -    system

            or any combination of the above.

  Returns:  an integer to be used as the handle, or -1 for error

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

                 handle = fcreatef("a:test.txt")
                 if (ferror() != 0)
                      @ 0,0 say "File error "+str(ferror())+"..."
                 else
                      string = fwriteline(handle,memvar)
                 endif

  Note:     Fcreatef() functions identical to fcreate() except that
            if a file by the same name exists already it is not
            truncated to zero bytes. Instead, fcreatef() will return
            a -1 (error). fcreatef() will only work under DOS 3.00 and
            greater. If you try to use fcreatef() on a machine running
            a version of DOS less than 3.00, than a -1 (error) is
            always returned.

See Also: freadline() ferase()

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