Delphi equivalent to Free Pascal's FPC define?

jwdietrich

Is there a compiler define that tells if source code is compiled with delphi, in the sense of an equivalent to the FPC define in Free Pascal?

I am developing a unit that should be compatible with three Pascal compilers (Lazarus / Free Pascal, Delphi and winsoft PocketStudio). There are some differences among the compilers, therefore I would like to provide some critical parts of the code in a compiler-specific version.

For Free Pascal I can write

{$IFDEF FPC}
  DoSomething;
{$ENDIF}

but what is the equivalent for Delphi?

Remy Lebeau

The DCC define was added to the Delphi compiler in XE2. Prior to that, you had to use {$IFDEF VERxxx} statements to check for the presence of individual VERxxx defines for each version of Delphi, or an {$IF DECLARED(CompilerVersion)} statement for Delphi 6+.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Delphi equivalent to Free Pascal's FPC define?

From Dev

Is there a delphi ScrollInView equivalent in Free Pascal?

From Dev

Is there an equivalent to C's __LINE__ macro in Pascal?

From Dev

Is there an equivalent to C's __LINE__ macro in Pascal?

From Dev

FPC pointer operation to Delphi adjustent

From Dev

x64 asm assign value to a by ref parameter works in Delphi, but not Lazarus Free Pascal

From Dev

Is there a Delphi's "with..do" Java equivalent?

From Dev

What is the Delphi equivalent to C++'s memset?

From Dev

RawByteString type in Free Pascal

From Dev

Python's equivalent for define_method

From Dev

Pascal Delphi - Undeclared Identifier

From Dev

Identifier not found on compiler (Free Pascal)

From Dev

Identifier not found on compiler (Free Pascal)

From Dev

C# equivalent HGlobal Pascal

From Dev

Pascal/Delphi dynamic array as argument

From Dev

What's the equivalent of C++ `const` return types in Delphi

From Dev

What is the equivalent of C's #define when specifying an array size in Rust?

From Dev

Point-free equivalent

From Dev

Delphi manage free memory

From Dev

`this` keyword equivalent in delphi

From Dev

Passing value of JSON data to Free Pascal variable

From Dev

Checking to see if a number is within a range in free pascal

From Dev

Free Pascal accepting MOVQ xmm, r

From Dev

Execute Commands in the Linux Commandline [Lazarus / Free Pascal]

From Dev

Use of VARIANT* parameter in ActiveX method in Free Pascal

From Dev

Checking to see if a number is within a range in free pascal

From Dev

What versions of lazarus and free pascal are stable and compatible

From Dev

Free Pascal: detect "is word char" for WideChar

From Dev

Tic Tac Toe check winner free pascal

Related Related

HotTag

Archive