
			Turbo Pascal Run-Time Errors
			

   Ha valaki olyan programot hasznl, amely Turbo Pascal-ban rdott, s
 amelyik valami hiba miatt lell egy 'Runtime error xxx at yyyy:zzzz'-vel,
 akkor tbbfle dolgot lehet tenni. Vagy hagyni a programot, vagy pedig
 megprblni megkeresni a hibt. Sok esetben a hibt valami kisebb dolog
 okozza (pl. Read-Only egy file), ilyen esetekben sokat segthet az albbi
 tblzat.


  Run-Time Error Messages
 
 Error
   #  Error Message
 
    1 Invalid function number
    2 File not found
    3 Path not found
    4 Too many open files
    5 File access denied
    6 Invalid file handle
   12 Invalid file access code
   15 Invalid drive number
   16 Cannot remove current directory
   17 Cannot rename across drives
  100 Disk read error
  101 Disk write error
  102 File not assigned
  103 File not open
  104 File not open for input
  105 File not open for output
  106 Invalid numeric format
  150 Disk is write-protected
  151 Bad drive request struct length
  152 Drive not ready
  154 CRC error in data
  156 Disk seek error
  157 Unknown media type
  158 Sector Not Found
  159 Printer out of paper
  160 Device write fault
  161 Device read fault
  162 Hardware failure
  200 Division by zero
  201 Range check error
  202 Stack overflow error
  203 Heap overflow error
  204 Invalid pointer operation
  205 Floating point overflow
  206 Floating point underflow
  207 Invalid floating point operation
  208 Overlay manager not installed
  209 Overlay file read error
  210 Object not initialized
  211 Call to abstract method
  212 Stream registration error
  213 Collection index out of range
  214 Collection overflow error

    Ŀ
 #1  Invalid function number 
    

A call was made to a non-existent DOS function.

    Ŀ
 #2  File not found 
    

The routines Reset, Append, Rename, and Erase report this error if the name
assigned to the file variable doesn't specify an existing file.

    Ŀ
 #3  Path not found 
    

The routines Reset, Rewrite, Append, Rename, and Erase report this error if
the name assigned to the file variable is invalid or specifies a
non-existent subdirectory.

The routines ChDir, MkDir, or RmDir report this error if the path is invalid
or if it specifies a non-existent subdirectory.

    Ŀ
 #4  Too many open files 
    

The routines Reset, Rewrite, and Append report this error if the program has
too many open files.

DOS never allows more than 15 open files per process.

If you get this error with less than 15 open files, the CONFIG.SYS file
might not include a FILES=xx entry (or xx might specify too few files).

Increase the number xx to some suitable value, such as 20.

    Ŀ
 #5  File access denied 
    

 Reported by  If This Problem Occurs

 Reset or     If FileMode allows writing and the name assigned
  Append      to the file variable specifies a directory or a
	      read-only file.
 Rewrite      The directory is full, or the name assigned to
	      the file variable specifies a directory or an
	      existing read-only file.
 Rename       The name assigned to the file variable specifies
	      a directory, or the new name specifies an
	      existing file.
 Erase        The name assigned to the file variable specifies
	      a directory or a read-only file.
 MkDir        A file with the same name exists in the parent
	      directory, or there is no room in the parent
	      directory, or the path specifies a device.
 RmDir        The directory isn't empty, or the path doesn't
	      specify a directory, or the path specifies the
	      root directory.
 Read or      (On a typed or untyped file): The file is not
  BlockRead   open for reading.
 Write or     (On a typed or untyped file): The file is not
  BlockWrite  open for writing.

    Ŀ
 #6  Invalid file handle 
    

This error is reported if an invalid file handle is passed to a DOS system
call.

This error should never occur; if it does, you know that the file variable
is somehow trashed.

     Ŀ
 #12  Invalid file access code 
     

Reset and Append report this error (on a typed or untyped file) if the value
of FileMode is invalid.

     Ŀ
 #15  Invalid drive number 
     

GetDir reports this error if the drive number is invalid.

     Ŀ
 #16  Cannot remove current directory 
     

RmDir reports this error if the path specifies the current directory.

     Ŀ
 #17  Cannot rename across drives 
     

Rename reports this error if both names are not on the same drive.

      Ŀ
 #100  Disk read error 
      

Read reports this error on a typed file if you attempt to read past the end
of the file.

      Ŀ
 #101  Disk write error 
      

Close, Write, Writeln, and Flush report this error if the disk becomes full.

      Ŀ
 #102  File not assigned 
      

Reset, Rewrite, Append, Rename, and Erase report this error if the file
variable has not been assigned a name through a call to Assign.

      Ŀ
 #103  File not open 
      

These routines report this error if the file is not open:

 BlockRead      BlockWrite     Close          Eof            FilePos
 FileSize       Flush          Read           Seek           Write

      Ŀ
 #104  File not open for input 
      

These routines report this error on a text file if the file is not open for
input:

 Eof          Eoln         Read         ReadLn       SeekEof
 SeekEoln

      Ŀ
 #105  File not open for output 
      

Write and WriteLn report this error on a text file if the file is not open
for output.

      Ŀ
 #106  Invalid numeric format 
      

Read and ReadLn report this error if a numeric value read from a text file
doesn't conform to the proper numeric format.

      Ŀ
 #150  Disk is write-protected 
      

A write operation to a write-protected disk was attempted.

      Ŀ
 #151  Bad drive request struct length 
      

The DOS device driver reported an internal error.

      Ŀ
 #152  Drive not ready 
      

 There is no disk in the drive, or
 The drive door is open, or
 The drive is not ready to be accessed.

      Ŀ
 #154  CRC error in data 
      

DOS detected an error in the recorded data on your disk drive.

      Ŀ
 #156  Error 156 or Error 158 
      

DOS reported an error while attempting to find data on your disk.

      Ŀ
 #157  Unknown media type 
      

DOS can't recognize the type of disk in your drive.

      Ŀ
 #158  Error 156 or Error 158 
      

DOS reported an error while attempting to find data on your disk.

      Ŀ
 #159  Printer out of paper 
      

Your printer is signalling that it is out of paper.

      Ŀ
 #160  Device write fault 
      

DOS encountered a hardware error when attempting to write to a device.

      Ŀ
 #161  Device read fault 
      

DOS encountered a hardware error when attempting to read from a device.

      Ŀ
 #162  Hardware failure 
      

DOS encountered a hardware failure on an I/O device.

      Ŀ
 #201  Range check error 
      

This error is reported by statements compiled in the {$R+} state when one of
the following situations arises:

  The index of an array was out of range.
  The program attempted to assign an
     out-of-range value to a variable.
  The program attempted to pass an
     out-of-range value as a parameter to a
     procedure or function.

      Ŀ
 #202  Stack overflow error 
      

The program reports this error on entry to a procedure or function compiled
in the {$S+} state when there is not enough stack space to allocate the
subprogram's local variables.

Increase the size of the stack by using the $M compiler directive.

The Stack Overflow error can also be caused by infinite recursion, or by an
assembly language procedure that doesn't maintain the stack properly.

      Ŀ
 #203  Heap overflow error 
      

New and GetMem report this error when there is not enough free space in the
heap to allocate a block of the requested size.

If you get Heap Overflow errors when running your program from within the
IDE, try exiting Turbo Pascal (FileExit) and running your program from the
DOS command line.

See run-time error #1: Out of Memory for suggestions on how to regain
memory.

For a complete discussion of the heap manager, refer to the chapter "Memory
Issues" in the Turbo Pascal Programmer's Guide.

      Ŀ
 #204  Invalid pointer operation 
      

Dispose and FreeMem report this error if the pointer is nil or if it points
to a location outside the heap.

      Ŀ
 #205  Floating point overflow 
      

A floating-point operation produced a number too large for Turbo Pascal (or
the numeric coprocessor, if there is one) to handle.

      Ŀ
 #206  Floating point underflow 
      

A floating-point operation produced an underflow.

This error is only reported if you are using the 8087 numeric coprocessor
with a control word that unmasks underflow exceptions.

By default, an underflow causes a result of zero to be returned.

      Ŀ
 #207  Invalid floating point operation 
      

One of the following floating-point errors occured:

  The real value passed to Trunc or Round
   could not be converted to an Integer
   within the Longint range (-2147483648 to
   2147483647).

  The argument passed to the Sqrt function
   was negative.

  The argument passed to the Ln function was
   zero or negative.

  An 8087 stack overflow occurred.

For details on correctly programming the 8087, refer to the chapter "Using
the 8087" in the Turbo Pascal Programmer's Guide.

      Ŀ
 #208  Overlay manager not installed 
      

Your program is calling an overlaid procedure or function, but the overlay
manager is not installed.

Most likely, you are not calling OvrInit, or the call to OvrInit failed.

 NOTE: If you have initialization code in any of your overlaid units, you
must create an additional non-overlaid unit that calls OvrInit, and use that
unit before any of the overlaid units.

      Ŀ
 #209  Overlay file read error 
      

A read error occurred when the overlay manager tried to read an overlay from
the overlay file.

      Ŀ
 #210  Object not initialized 
      

With range-checking on, you made a call to an object's virtual method,
before the object had been initialized via a constructor call.

      Ŀ
 #211  Call to abstract method 
      

This error is generated by the Abstract procedure in the Objects unit.

It indicates that your program tried to execute an abstract virtual method.

      Ŀ
 #212  Stream registration error 
      

This error is generated by the RegisterType procedure in the Objects unit.

It indicates that one of the following errors has occurred:

 The stream registration record does not
  reside in the data segment.
 The ObjType field of the stream
  registration record is 0.
 The type has already been registered.  Another type with the same ObjType
value
  already exists.

      Ŀ
 #213  Collection index out of range 
      

The index passed to a TCollection method is out of range.

      Ŀ
 #214  Collection overflow error 
      

This error is reported by a TCollection if an attempt is made to add an
element when the collection cannot be expanded.

