Marco van de Voort het geskryf: > > How to do this depends on how far back you want to support (1.0.x don't even > support $IF), and far into the future.
FPC is free, so I only support up to the previous release. There should be no excuse not to upgrade (this is very different from Delphi). tiOPF support Delphi all the way back to D7. I don't do that for FPC. > Afaik FULL_VERSION was introduced in either 2.2.2 or 2.2.4 to fix at least ^^^^^^^^^^^^ should be FPC_FULLVERSION. ------------------------------ $ git log --grep="FPC_FULLVERSION" commit 05a4a0dadd7d712709d35129345bd06ede45e645 Author: Florian Klaempfl <flor...@freepascal.org> Date: Sun Aug 3 09:31:50 2008 +0000 + defined FPC_FULLVERSION as integer constant containing the version, release and patch level are always two digits so the version can be compared numerically: so 2.2.2 results in 20202, resolves #11568 git-svn-id: http://svn2.freepascal.org:8080/svn/fpc/tr...@11504 3ad0048d-3df ------------------------------ I'm not sure what release version that was (r11504). > {$if FPC_FULLVERSION>=20300} //2.3.4 would be encoded as 020304 Excellent, your example is going to work better than VER2_3 or VER2_4 because it will still apply for FPC 2.5 etc... Luckily I looked this up in the prog.pdf, even though I don't have $MACROS ON defined, the compiler for some reason never complained about my usage of FPC_FULLVERSION. Umm, I wonder if this is a bug, or if the docs are wrong (section 2.2 in prog.pdf)? Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal