Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Pascal - <b> ioresult return i/o operation status pp 116</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 IORESULT                Return I/O Operation Status                  pp 116

 Syntax:  IOResult ;

 Type:    Integer

 Form:    Function

 Purpose: Provides a status code of an I/O operation.

 Notes:   The I compiler directive controls runtime I/O error code checking.
          When passive, any I/O error must be cleared by calling IOResult
          before program execution continues.

          IOResult allows the programmer to handle errors that would halt
          the program if I/O checking were enabled.

          A return code of zero indicates successful operation.  Any code
          greater than zero indicates an error.

          It is good practice to assign the return code from IOResult
          to a variable immediately upon receipt.  Work with the variable
          rather than directly with the function.

 Procs:   IOResult should be used with the following procedures when I/O
          checking is passive {$I-}:

                   Append       Close       Read       Seek
                   Assign       Erase       ReadLn     Write
                   BlockRead    Execute     Rename     Write
                   BlockWrite   Flush       Reset
                   Chain        GetDir      Rewrite
                   ChDir        MkDir       RmDir

 Usage:
       VAR
          Ok : Boolean;            { Ok must be Boolean type         }

       BEGIN
          Ok := (IOresult = 0) ;   { OK is true only if IOResult = 0 }
       END.

See Also: Boolean $I Directive

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