Show: Delphi C++
Display Preferences

Input-Output Errors

From RAD Studio
Jump to: navigation, search

Go Up to Delphi Compiler Errors Index

I/O (input-output) errors cause an exception to be thrown if a statement is compiled in the {$I+} state. (If the application does not include the System.SysUtils unit, the exception causes the application to terminate).

Handling I/O Errors

In the {$I-} state, the program continues to execute, and the error is reported by the IOResult function.

I/O Error List

The following table lists all I/O errors, numbers, and descriptions.

Number

Name

Description

100

Disk read error

Reported by Read on a typed file if you attempt to read past the end of the file.

101

Disk write error

Reported by CloseFile, Write, WriteIn, or Flush if the disk becomes full.

102

File not assigned

Reported by Reset, Rewrite, Append, Rename, or Erase if the file variable has not been assigned a name through a call to Assign or AssignFile.

103

File not open

Reported by CloseFile, Read Write, Seek, Eof, FilePos, FileSize, Flush, BlockRead, or BlockWrite if the file is not open.

104

File not open for input

Reported by Read, Readln, Eof, Eoln, SeekEof, or SeekEoln on a text file if the file is not open for input.

105

File not open for output

Reported by Write or Writeln on a text file if you do not generate a Console application.

106

Invalid numeric format

Reported by Read or Readln if a numeric value read from a text file does not conform to the proper numeric format.



See Also

Personal tools
In other languages
Previous Versions
Assistance