Unification of notations

Top  Previous  Next

User interface > Translation > Preprocessing > Unification of notations

 

While Delphi code is case insensitive, C++ code is case sensitive. So different notations of identifiers have to be unified. Delphi2Cpp uses a simple approach to do that. As soon a a new identifier is recognized it is put into a list and all further notations of this identifier are replaced by the first one (exception: see below). Identifiers used at the refactoring also have an impact on the notations in the output.

 

After one or several files have been processed the list can be saved.

 

This unification is done by the preprocessor, which also is responsible for the conditional compilation. For "Cpp"-sections, there is a special option.

 

Some notations have a special meaning in C++ and are fixed. i.e. they are not controlled by the list of identifiers. These identifiers are:

 

Char

String

break

continue

explicit

implicit

 

The following identifiers are fixed, because they denote C++ UnicodeString methods:

 

BytesOf

ByteType

c_str

cat_printf

cat_sprintf

cat_vprintf

CodePage

Compare

CompareIC

CurrToStr

CurrToStrF

data

Delete

ElementSize

EnsureUnicode

FloatToStrF

FmtLoadStr

Format

FormatFloat

Insert

IntToHex

IsDelimiter

IsEmpty

IsLeadSurrogate

IsPathDelimiter

IsTrailSurrogate

LastChar

LastDelimiter

Length

LoadStr

LoadString

LowerCase

Pos

printf

RefCount

SetLength

sprintf

StringOfChar

SubString

swap

t_str

ToDouble

ToInt

ToIntDef

Trim

TrimLeft

TrimRight

Unique

UpperCase

vprintf

w_str

 

 

 

 

 



This page belongs to the Delphi2Cpp Documentation

Delphi2Cpp home  Content