pascal程序错误对照表!

发!
2025-05-04 09:23:51
推荐回答(2个)
回答(1):

FreePascal错误一览表------------1、RunTimeErrors运行错误

(A) DOS 错误代码:
1:无效DoS功能号
2:文件末找到
3:路径未找到
4:打开文件过多
5:禁止文件存取
6:无效文件句柄
12:无效文件存取代码
15:无效驱动器号
16:不能删除当前日录
17:不能跨驱动器改文件名
(B) I/O错误
100:磁盘读错误
101:磁盘写错误
102:文件变量末赋值
103:文件未打开
104:文件未用输入方式打开
105:文件末用输出方式打开
106:无效数字格式
(C) 严重错误
150:磁盘写保护
15l:未知单元
152:驱动器未准备好
153:未知命令
154:数据CRC校验错
155:驱动器请求的结构长度错
156:磁盘定位错
157:未知媒介类型
158:扇区末找到
159:打印机缺纸
160:设备写失败
161:设备读失败
162:硬件故障
(D) 致命错误
200:被零除
20l:范围检查错
202:堆栈溢出错
203:堆溢出错
204:无效指针操作
205:浮点上溢出
206:浮点下溢出
207:无效浮点运算
208:未安装覆盖管理程序
209:覆盖文件读错
210:对象未初始化
2ll:调用抽象方法
212:流登计错
213:集合下标越界
214:集合溢出
215:算术上溢错误
216:存取非法
217:控制-C
218:授权指令
219:无效的TYPECAST
220:无效的变体TYPECAST
221:无效的变体操作
222:没有变体方法调用DISPATCHER
223:不能建立变体数组
224:变体不包含数组
225:变体数组边界错误
226:TLS初始化错误

free pascal error table(运行错误对照表)

1 Invalid function number
You tried to call a DOS function which doesn't exist.
2 File not found
You can get this error when you tried to do an operation on a file which doesn't exist.
3 Path not found
You can get this error when you tried to do an operation on a file which doesn't exist, or when you try to change to, or remove a directory that doesn't exist, or try to make a subdirectory of a subdirectory that doesn't exist.
4 Too many open files
When attempting to open a file for reading or writing, you can get this error when your program has too many open files.
5 File access denied
You don't have access to the specified file.
6 Invalid file handle
If this happens, the file variable you are using is trashed; it indicates that your memory is corrupted.
12 Invalid file access code
This will happen if you do a reset or rewrite of a file when FileMode is invalid.
15 Invalid drive number
The number given to the Getdir function specifies a non-existent disk.
16 Cannot remove current directory
You get this if you try to remove the current diirectory.
17 Cannot rename across drives
You cannot rename a file such that it would end up on another disk or partition.
100 Disk read error
DOS only. An error occurred when reading from disk. Typically when you try to read past the end of a file.
101 Disk write error
DOS only. Reported when the disk is full, and you're trying to write to it.
102 File not assigned
This is reported by Reset, Rewrite, Append, Rename and Erase, if you call them with an unassigne function as a parameter.
103 File not open
Reported by the following functions : Close , Read, Write, Seek, EOf, FilePos, FileSize, Flush, BlockRead, and BlockWrite if the file isn't open.
104 File not open for input
Reported by Read, BlockRead, Eof, Eoln, SeekEof or SeekEoln if the file isn't opened with Reset.
105 File not open for output
Reported by write if a text file isn't opened with Rewrite.
106 Invalid numeric format
Reported when a non-numerice value is read from a text file, when a numeric value was expected.
150 Disk is write-protected
(Critical error, DOS only.)
151 Bad drive request struct length
(Critical error, DOS only.)
152 Drive not ready
(Critical error, DOS only.)
154 CRC error in data
(Critical error, DOS only.)
156 Disk seek error
(Critical error, DOS only.)
157 Unknown media type
(Critical error, DOS only.)
158 Sector Not Found
(Critical error, DOS only.)
159 Printer out of paper
(Critical error, DOS only.)
160 Device write fault
(Critical error, DOS only.)
161 Device read fault
(Critical error, DOS only.)
162 Hardware failure
(Critical error, DOS only.)
200 Division by zero
You are dividing a number by zero.
201 Range check error
If you compiled your program with range checking on, then you can get this error in the following cases:
An array was accessed with an index outside its declared range. 数组越界访问
You're trying to assign a value to a variable outside its range (for instance a enumerated type). 超出变量范围,例如i:=32768;其中i为integer类型
202 Stack overflow error
The stack has grown beyond itss maximum size. This error can easily occur if you have recursive functions.
203 Heap overflow error
The heap has grown beyond its boundaries, ad you are rying to get more memory. Please note that Free Pascal provides a growing heap, i.e. the heap will try to allocate more memory if needed. However, if the heap has reached the maximum size allowed by the operating system or hardware, then you will get this error.
204 Invalid pointer operation
This you will get if you call dispose or Freemem with an invalid pointer (notably, Nil)
205 Floating point overflow
You are trying to use or produce too large real numbers.
206 Floating point underflow
You are trying to use or produce too small real numbers.
207 Invalid floating point operation
Can occur if you try to calculate the square root or logarithm of a negative number.
210 Object not initialized
When compiled with range checking on, a program will report this error if you call a virtal method without having initialized the VMT.
211 Call to abstract method
Your program tried to execute an abstract virtual method. Abstract methods should be overridden, and the overriding method should be called.
212 Stream registration error
This occurs when an invalid type is registered in the objects unit.
213 Collection index out of range
You are trying to access a collection item with an invalid index. (objects unit)
214 Collection overflow error
The collection has reached its maximal size, and you are trying to add another element. (objects unit)
215 数字超出范围(例如3000000000超出长整形范围)
216 General Protection fault
You are trying to access memory outside your appointed memory.
217 Unhandled expetion occurred
An exception occurred, and there was no exception handler present. The sysutils unit installs a default exception handler which catches all excpetions and exits gracefully.

回答(2):

DOS 错误代码:
1无效DoS功能号
2文件末找到
3路径未找到
4打开文件过多
5禁止文件存取
6无效文件句柄
12无效文件存取代码
15无效驱动器号
16不能删除当前日录
17不能跨驱动器改文件名

I/O错误
100磁盘读错误
101磁盘写错误
102文件变量末赋值
103文件未打开
104文件未用输入方式打开
105文件末用输出方式打开
106无效数字格式

严重错误
150磁盘写保护
15l未知单元
152驱动器未准备好
153未知命令
154数据CRC校验错
155驱动器请求的结构长度错
156磁盘定位错
157未知媒介类型
158扇区末找到
159打印机缺纸
160设备写失败
161设备读失败
162硬件故障

致命错误
200被零除
20l范围检查错
202堆栈溢出错
203堆溢出错
204无效指针操作
205浮点上溢出
206浮点下溢出
207无效浮点运算
208未安装覆盖管理程序
209覆盖文件读错
210对象未初始化
2ll调用抽象方法
212流登计错
213集合下标越界
214集合溢出