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>ferror() - test for a dos error after a file function</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     ferror() - test for a DOS error after a file function
  Usage:    <integer> = ferror()
  Params:   none
  Returns:  integer equal to the last file error number, 0 if none

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

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

  Note:     Some of the FUNCky file functions allocate memory. If
            the memory allocation fails, ferror() is set to 8. See
            the dos_error() function in your Clipper manual for a
            complete list of file function error codes. ferror()
            is documented in FUNCky to show that all FUNCky file
            functions interact with Clipper's ferror() codes. If any
            file function returns an error value, you can check the
            type of error with ferror(). Note that Summer'87 Clipper
            intercepts the DOS critical error message 'Abort, Retry,
            Ignore' so you do not have to worry about open drive
            doors or full disks aborting your program.


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