[fpc-pascal] $IF documentation - missing help

Marco van de Voort marcov at stack.nl
Tue Sep 15 14:52:38 CEST 2009


In our previous episode, Aleksa Todorovic said:
> Maybe
> 
> {$IF Defined(VER2_3) or Defined(VER2_4))
> ?...
> {$ENDIF}

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.

Afaik FULL_VERSION was introduced in either 2.2.2 or 2.2.4 to fix at least
the future proof part. If you discount 2.2.0 (and maybe 2.2.2 too, since the
fix was made a few days before 2.2.2 came out and might not be merged) you
could try:

  {$if FPC_FULLVERSION>=20300}  //2.3.4 would be encoded as 020304

  {$endif}





More information about the fpc-pascal mailing list