Free Pascal Runtime Library (RTL)
- Initialization of the run-time-library itself prior to activation of the user's application
- Initialization and startup of the application
- providing standard Pascal services to the application (support for the Write and Writeln standard functions, for example)
- providing any library functions which are not defined inline by the compiler such as mathematical routines
- providing extended Pascal services to the application (support for the Assign extended function to assign a reference to an external file to a file variable).
- providing a conversion for local equivalents for a standard or extended function into the local equivalent (for example, changing the Write or writeln statement to write to a window in a windowed environment if the file variable is pointing to a window, to write to the screen in a text environment if the file is pointing to the terminal, or to write to a file if the file variable is pointing to an external file.
There are many different units with partly overlapping functionality. This is caused by different reasons, especially:
- FPC tries to be compatible to two different compilers (Turbo Pascal/Borland Pascal and Delphi) with slightly different syntax and different sets of supplied units for two different paradigms (procedural and object oriented programming)
- FPC supports many different platforms requiring support of both platform specific API functions and common routines available across all or at least most supported platforms.
A simplified overview can be found in this unit categorization. A detailed description of individual units and included routines is available in the RTL unit reference manual provided as part of the FPC documentation.
Read about the API units (Video/Mouse/Keyboard) and the Crt Unix, the bigger picture in KVM API and Crt future
The windows interface units have an own page here