sysutils: Difference between revisions
(expand) |
m (Improved English grammar) |
||
Line 1: | Line 1: | ||
{{sysutils}} | {{sysutils}} | ||
The [[Unit|unit]] '''<syntaxhighlight lang="pascal" inline>sysUtils</syntaxhighlight>''' shipped with the [[FPC|FPC’s]] default [[RTL|run-time library]] provides | The [[Unit|unit]] '''<syntaxhighlight lang="pascal" inline>sysUtils</syntaxhighlight>''' shipped with the [[FPC|FPC’s]] default [[RTL|run-time library]] provides many system utilities. | ||
It attempts to be as compatible to [[Delphi|Delphi’s]] <syntaxhighlight lang="pascal" inline>sysUtils</syntaxhighlight> unit as possible. | It attempts to be as compatible to [[Delphi|Delphi’s]] <syntaxhighlight lang="pascal" inline>sysUtils</syntaxhighlight> unit as possible. | ||
However, the FPC version is available on [[Platform list|all platforms the FPC supports]]. | However, the FPC version is available on [[Platform list|all platforms that the FPC supports]]. | ||
It does not contain any Windows-related routines or other highly platform-specific functionality. | |||
== Notable functionality == | |||
* [[Format function|<syntaxhighlight lang="pascal" inline>format</syntaxhighlight>]] | * [[Format function|<syntaxhighlight lang="pascal" inline>format</syntaxhighlight>]] | ||
* {{Doc|package=RTL|unit=sysutils|identifier=typehelpers|text=type helpers for all basic data types}} | * {{Doc|package=RTL|unit=sysutils|identifier=typehelpers|text=type helpers for all basic data types}} | ||
== | == Caveats == | ||
{{Doc|package=RTL|unit=system|identifier=runtimeerrors|text=If the <syntaxhighlight lang="pascal" inline>sysUtils</syntaxhighlight> unit is included}}, all [[runtime error|run-time errors]] become [[Exceptions|exceptions]], | |||
You will need to include <syntaxhighlight lang="pascal" inline>sysUtils</syntaxhighlight> in every unit that may throw an exception | {{Doc|package=RTL|unit=system|identifier=runtimeerrors|text=If the <syntaxhighlight lang="pascal" inline>sysUtils</syntaxhighlight> unit is included}}, all [[runtime error|run-time errors]] become [[Exceptions|exceptions]], which virtually forces you to use a [[Compiler Mode|compiler mode]] (or [[modeswitch|mode switch]]) that allows exception treatment. | ||
You will need to include <syntaxhighlight lang="pascal" inline>sysUtils</syntaxhighlight> in every unit that may throw an exception, even though the unit itself does not use any of the included system utilities. | |||
== See also == | |||
* {{Doc|package=RTL|unit=sysutils|text=<syntaxhighlight lang="pascal" inline>sysUtils</syntaxhighlight> reference}} | * {{Doc|package=RTL|unit=sysutils|text=<syntaxhighlight lang="pascal" inline>sysUtils</syntaxhighlight> reference}} | ||
* [http://docwiki.embarcadero.com/Libraries/Sydney/en/System.SysUtils Delphi’s <syntaxhighlight lang="pascal" inline>sysUtils</syntaxhighlight> unit] | * [http://docwiki.embarcadero.com/Libraries/Sydney/en/System.SysUtils Delphi’s <syntaxhighlight lang="pascal" inline>sysUtils</syntaxhighlight> unit] | ||
* [[libc | * [[libc|<syntaxhighlight lang="pascal" inline>libc</syntaxhighlight>]] <!-- similar in design --> | ||
* [[System unit|<syntaxhighlight lang="pascal" inline>system</syntaxhighlight> unit]] | * [[System unit|<syntaxhighlight lang="pascal" inline>system</syntaxhighlight> unit]] |
Revision as of 22:37, 22 January 2021
│
English (en) │
Esperanto (eo) │
français (fr) │
The unit sysUtils
shipped with the FPC’s default run-time library provides many system utilities.
It attempts to be as compatible to Delphi’s sysUtils
unit as possible.
However, the FPC version is available on all platforms that the FPC supports.
It does not contain any Windows-related routines or other highly platform-specific functionality.
Notable functionality
Caveats
If the sysUtils
unit is included, all run-time errors become exceptions, which virtually forces you to use a compiler mode (or mode switch) that allows exception treatment.
You will need to include sysUtils
in every unit that may throw an exception, even though the unit itself does not use any of the included system utilities.