9.1 Standard units

The following units are standard and are meant to be ported to all platforms supported by Free Pascal. A brief description of each unit is also given.

charset

A unit to provide mapping of character sets.

cmem

Using this unit replaces the Free Pascal memory manager with the memory manager of the C library.

crt

This unit is similar to the unit of the same name of Turbo Pascal. It implements writing to the console in color, moving the text cursor around and reading from the keyboard.

dos

This unit provides basic routines for accessing the operating system. This includes file searching, environment variables access, getting the operating system version, getting and setting the system time. It is to note that some of these routines are duplicated in functionality in the sysutils unit.

dynlibs

Provides cross-platform access to loading dynamical libraries.

getopts

This unit gives you the gnu getopts command line arguments handling mechanism. It also supports long options.

graph

This unit is deprecated. This unit provides basic graphics handling, with routines to draw lines on the screen, display text etc. It provides the same functions as the Turbo Pascal unit.

heaptrc

a unit which debugs the heap usage. When the program exits, it outputs a summary of the used memory, and dumps a summary of unreleased memory blocks (if any). You should not include this unit directly, instead use the -gh command-line switch.

keyboard

provides basic keyboard handling routines in a platform independent way, and supports writing custom drivers.

macpas

This unit implements several functions available only in MACPAS mode. This unit should not be included; it’s automatically included when the MACPAS mode is used.

math

This unit contains common mathematical routines (trigonometric functions, logarithms, etc.) as well as more complex ones (summations of arrays, normalization functions, etc.).

matrix

A unit providing matrix manipulation routines.

mmx

This unit provides support for mmx extensions in your code.

mouse

Provides basic mouse handling routines in a platform independent way, and supports writing custom drivers.

objects

This unit provides the base object for standard Turbo Pascal objects. It also implements File and Memory stream objects, as well as sorted and non-sorted collections, and string streams.

objpas

Is used for Delphi compatibility. You should never load this unit explicitly; it is automatically loaded if you request Delphi mode.

printer

This unit provides all you need for rudimentary access to the printer using standard I/O routines.

sockets

This gives the programmer access to sockets and TCP/IP programming.

strings

This unit provides basic string handling routines for the pchar type, comparable to similar routines in standard C libraries.

system

This unit is available for all supported platforms. It includes among others, basic file I/O routines, memory management routines, all compiler helper routines, and directory services routines.

strutils

Offers a lot of extended string handling routines.

dateutils

Offers a lot of extended date/time handling routines for almost any date and time math.

sysutils

Is an alternative implementation of the sysutils unit of Delphi. It includes file I/O access routines which takes care of file locking, date and string handling routines, file search, date and string conversion routines.

typinfo

Provides functions to access runtime Type Information, just like Delphi.

variants

Provides basic variant handling.

video

Provides basic screen handling in a platform independent way, and supports writing custom drivers.