[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Input/Output Errors
Input/Output (I/O) errors occur when an error is encountered while the
program is attempting to read data in, write data out, or perform some
other file operation.
Hex Dec Meaning
--- --- -------
$01 01 File does not exist
$02 02 File not open for input
$03 03 File not open for output
$04 04 File not open
$10 16 Error in numeric format
$20 32 Operation not allowed on a logical device
$21 33 Not allowed in direct mode
$22 34 Assign to std files not allowed
$90 144 Record length mismatch
$91 145 Seek beyond end-of-file
$99 153 Unexpected end-of-file
$F0 240 Disk write error
$F1 241 Directory is full
$F2 242 File size overflow
$F3 243 Too many open files
$FF 255 File disappeared
There are two ways of handling these errors. The first way is to let
the program terminate immediately if an I/O error occurs. This is the
default method of I/O error handling. This method can be turned on by
setting the I/O error handling directive to active {$I+}. The error
code will be printed on the screen in the following format:
I/O error NN, PC=address
Program Aborted
The error code NN is displayed in hexadecimal. The address 'address'
is also displayed in hexadecimal. If the user is in Turbo Pascal, then
he is prompted to press the <ESC> key to continue. At that point,
Turbo Pascal enters the Edit mode and the cursor is placed on the line
where the I/O error occurred. If the user is not in Turbo Pascal, but
at the MS-DOS command line, then after the I/O error message is
displayed, control will return to the operating system. If the user
wishes to determine the line at which the I/O error occurred, use the
'Find Run-time Error' option within the Options Menu.
The second way to handle I/O errors is established by setting the I/O
error handling directive to passive {$I-}. In this mode, it is up to
the programmer to handle I/O errors gracefully. If an I/O error does
occur, then the programmer must call the function IOResult which
returns the I/O error number. If the programmer does not call
IOResult, then all further I/O is suspended until IOResult is called.
See Also:
IOResult
Compiler Errors
Run-time Errors
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson