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.
Both Delphi and C++ applications can use the Delphi RTL. The Delphi RTL is composed of an extensive library of
.pas files that are compiled by the Delphi compiler (such as DCC32.exe). Then the Delphi compiler emits
.hpp files for the use of the C++ compiler (such as BCC32.exe). Thus, both Delphi and C++Builder use the Delphi RTL. The Delphi and C++ 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 that are similar to those in the C run-time library, but can be distinguished because Delphi RTL function names begin with a capital letter (such as Exp), while C RTL function names begin with a lowercase letter and sometimes a leading underscore (such as exp). Also, Delphi RTL functions are declared in the header of a unit, while C RTL functions are defined in a header (
.h) file. Examples: System.Assert and assert, System.TObject.Free and free, System.SysUtils.Abort and abort.
- The System unit contains most of the Delphi Run-Time Library (RTL).
- The following sections or groups of topics discuss many of the classes and routines that make up the RTL and illustrate how to use these RTL members.
- However, many important classes and routines of the run-time library are not mentioned in the topics below. These other routines include, but are not limited to, the following:
- The help also 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
- Standard RTL Path Functions across the Supported Target Platforms
- Other RTL units:
- C Runtime Library Reference Index
- Understanding the Component Library
- Overview of Component Creation
- Creating Drawing Spaces
- Converting Measurements
- Defining Custom Variants