Conditional compilation

Top  Previous  Next

User interface > Translation > Preprocessing > Conditional compilation

 

Delphi2Cpp uses a preprocessor (pretranslator), which prepares the source text so that directives for the conditional compilation are evaluated and removed.

Conditional expressions like

 

{$IF CompilerVersion >= 17.0}

 

 

are evaluated too, but there are some limitations. Only integer values are evaluated and only operators, which also exist in C++ are evaluated.

 

From version 1.0.1 on include directives are executed too.

 

{$I filename}

{$INCLUDE filename}

 

The file filename is included into the source.

 

 

The definitions can be set in the options dialog.

 

 

 



This page belongs to the Delphi2Cpp Documentation

Delphi2Cpp home  Content