[<<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
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson