Using the RTL (Run-Time Library)
Go Up to Using the RTL Index
The Delphi Run-Time Library (or RTL) is composed of a number of base units that provide the underlying support for most of the VCL and FMX component libraries. The RTL includes global routines, utility classes such as those that represent streams and lists, and classes such as TObject, TPersistent, and TComponent. Although closely allied with the FMX and VCL, the RTL does not include any of the components that appear on the Tool Palette. Instead, the classes and routines in the RTL are used by the components that do appear on the Tool Palette and are available for you to use in application code in either VCL projects or FireMonkey projects, or when you are writing your own classes.
The Delphi RTL is an extensive library of .pas files that are compiled by the Delphi compiler (DCC32.exe). Then the Delphi compiler emits .hpp files for the use of the C++ compiler (BCC32.exe). Thus, both Delphi and C++Builder use the Delphi RTL. The classes and members of the RTL are described in the Libraries Reference along with the VCL and FireMonkey libraries.
Note: Do not confuse the Delphi RTL with the C run-time library. Many of the routines in the Delphi RTL perform functions similar to those in the C run-time library, but can be distinguished because Delphi RTL function names begin with a capital letter (while C RTL function names begin with a lowercase letter), and Delphi RTL functions are declared in the header of a unit.
Note: The following topics discuss many of the classes and routines that make up the RTL and illustrate how to use them. However, the run-time library contains many routines to perform tasks that are not mentioned here. These other routines include (but are not limited to) a host of mathematical functions (defined in the System.Math unit), routines for working with date/time values (defined in the System.SysUtils and System.DateUtils units), and routines for working with Variant values (defined in the System.Variants unit). The help contains lists of RTL-related functions and types; see API Categories Index.
- Using Streams
- Working with Files
- Working with ini Files and the System Registry
- Working with Lists
- Working with String Lists
- Working with Strings
- Creating Drawing Spaces
- Converting Measurements
- Defining Custom Variants