Substitution options

Top  Previous  Next

User interface > Translation options > Substitution options

The substitution options are part of the translation options and allow to edit lists of identifiers which are used for different kinds of substitutions during the translation process.

 

 

OptionsSubstitutions

 

 

 

There are two possibilities how the pre-processor can substitute identifiers.

 

The identifiers are unified according to upper and lower case
Identifiers can be substituted to different ones,

 

 

The pre-processor does its work, before the Delphi parser starts. Therefore, you have to take care, that the pre-processor substitutions leave the Delphi code intact. On the contrary

 

the substitutions by the translator are executed after the code already has been parsed.
also some kinds of refactoring can be done now.

 

Substitutions of helper names are useful for C++Builder users to synchronize numbered helper names for enumeration types in the C++ code of C++Builder on one side and of Delphi2Cpp on the other side. For example System::Sysutils.hpp contains the following definition:

 

enum DECLSPEC_DENUM System_Sysutils__85 : unsigned char { rfReplaceAll, rfIgnoreCase };

 

but when Delphi2Cpp parses System.SysUtils.pas, it generates

 

enum SysutilsEnum__0 {rfReplaceAll,  rfIgnoreCase };

 

With the option to substitute helper names, SysutilsEnum__0 automatically can be substituted by System_Sysutils__85.

.

 

 

If you create C++ code for other compilers than C++Builder all properties are replaced by pairs of functions. You can change the prefixes for the function names here.

 

 

 



This page belongs to the Delphi2Cpp Documentation

Delphi2Cpp home  Content