Extended "System.pas"

Top  Previous  Next

User interface > Translation options > Input options > Extended "System.pas"

 

"System.pas" is a source file of special importance in Delphi projects.Fundamental type definitions, procedures and functions are defined in the System unit, which is implicitly included in every unit. For example TObject is defined there. There are other intrinsic definitions like the Read, Write or Str function, which are accessible in every unit too. These intrinsic function are built into the Delphi compiler. Delphi2C# must know the signatures of such intrinsic functions and tries to find them in the System.pas. So the original incomplete System.pas either has to be replaced by an extended copy or a the original System.pas has to be supplemented by an additional source file.

 

In the options dialog you can set the name of such an additional System.pas extension file.

 

 

System_pas

 

 

 

Such an individual System.pas called d2c_system.pas is in the Source folder of the Delphi2C# installation. No matter which name the file has, it internally is renamed to "d2c_system". With this name it is shown in the log-tree.

 

If an individual System.pas is used, the specially treated RTL/VCL functions and some compile time functions (Abs, High, Low, Odd, Pred, Succ) might have to be defined in this file for types, that cannot be handled by the built-in translation alternatives.

 

The overwritten System.pas gets always preprocessed, even if the option to pre-process files is disabled for all other files.

Because this file is very basic, it may not use other files.

 

Lookup algorithm

 

Delphi2C# looks up system types and functions etc. in following order::

 

1.Delphi2C# will look for declarations at first in your own System.pas, if it exists.
2.If the declaration is not found there, Delphi2C# will look in the System.pas of your Delphi installation, if the path to this file is set in the options..
3.If neither an own System.pas exists nor the path to the original System.pas is set, Delphi2C# simulates the most important parts of this file.

 

 

 

 



This page belongs to the Delphi2C# Documentation

Delphi2C# home  Content