Substitutions in the preprocessor
|Top Previous Next|
A substitution table for the preprocessor can be shown, if you click on the button "List of substitutions" in the group-box for preprocessor substitutions.
If you click on the button, the following grid is shown.
add a new row
remover the actual row
clear the whole table
In the first column the identifiers are listed, which shall be replaced by the preprocessor and in the second column identifiers are listed, which are inserted in the code instead of the found identifiers of the first column. The preprocessor recognizes text sections as identifiers, which start with a letter or a underlined and on which an arbitrarily number of letters, numbers or underlines can follow; i.e. as well the real Delphi identifiers as the Delphi keywords.
The substitution of identifiers during the pre-processing of the code can fulfill two purposes:
1. a desired notation of the identifiers can be forced.
The same purpose is accomplished by use of the list of identifiers.and this method should be preferred normally. However the items of this list are overwritten by the items of the substitution table. This may be a method to quickly check other notations.
2. completely other names can be assigned to certain identifiers.
So e.g., Delphi function names could be replaced by different names of equivalent C# functions.
For example it is recommended to make such substitutions for ampersand-expressions.
This page belongs to the Delphi2C# Documentation
|Delphi2C# home Content|