next up previous contents
Next: Optimizing techniques used in Up: Free Pascal programmers guide Previous: List of compiler source

Compiler limits

  Although many of the restrictions imposed by the MS-DOS system are removed by use of an extender, or use of another operating system, there still are some limitations to the compiler:

  1. String constants are limited to 128 characters. All other characters are simply dropped from the definition.
  2. The length of generated unit files is limited to 65K for the real-mode compiler, and to 1Mb for the 32-bit compiler. This limit can be changed by changing the bytearray1 type in cobjects.pas
  3. Procedure or Function definitions can be nested to a level of 32.
  4. Maximally 255 units can be used in a program when using the real-mode compiler. When using the 32-bit compiler, the limit is set to 1024. You can change this by redefining the maxunits constant in the files.pas compiler source file.
  5. Procedures or functions accept parameters with a total size up to $ffff bytes. This limit is due to the RET instruction of the I386 processor. If the calls were made using the C convention this limit would disappear.


Michael Van Canneyt
Tue Mar 31 16:50:06 CEST 1998