Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2006-02

Version 1 and Version 2 Defines

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Preslar
I'm pretty sure there are defines for the compiler version.. Something like;
   {$define VER_2_0_2}

for version 2.x of the compiler..

What would I need to use to differentiate fpc 1.x code from fpc 2.x code?

Reply by email

Michael Preslar
to Marco van de Voort
Show quoted text 7 lines
> What would I need to use to differentiate fpc 1.x code from fpc 2.x code? {$IFDEF VER1_0} // your legacy 1.0 code here. {$else} // your 2.0+ code here. {$endif}

Thanks to Marco and Felipe for the quick answer!

Reply by email