Recent

Author Topic: {$if defined(fpc2.4.0)} ?  (Read 4614 times)

Fred vS

  • Hero Member
  • *****
  • Posts: 3813
    • StrumPract is the musicians best friend
{$if defined(fpc2.4.0)} ?
« on: January 10, 2013, 11:56:28 am »
Hello everybody  ::)
Does it exists something to say to compiler what to do with certain version of fpc ? For example :

 
Code: [Select]
{$if defined(fpc2.4.0)}
    do something...
     {$else}
   do something else
     {$endif}

Also does it exist something to say to compiler what to do with type of system installed like ?

 
Code: [Select]
{$if defined(Windows XP 32)}
    do something...
     {$else}
{$if defined(Windows 7 32)}
    do something...
     {$else}
   do something else
   {$endif}  {$endif}

Thanks
« Last Edit: January 10, 2013, 12:00:15 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: {$if defined(fpc2.4.0)} ?
« Reply #1 on: January 10, 2013, 12:48:22 pm »

User137

  • Hero Member
  • *****
  • Posts: 1791
    • Nxpascal home
Re: {$if defined(fpc2.4.0)} ?
« Reply #2 on: January 10, 2013, 04:07:08 pm »
+ the other thing you explained in other thread, i didn't see it documented but it's rather important:
Code: [Select]
{$ifdef fpc_fullversion <= 20600}

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: {$if defined(fpc2.4.0)} ?
« Reply #3 on: January 10, 2013, 04:38:01 pm »
Quote
i didn't see it documented
It is in the link I gave above

Fred vS

  • Hero Member
  • *****
  • Posts: 3813
    • StrumPract is the musicians best friend
Re: {$if defined(fpc2.4.0)} ?
« Reply #4 on: January 10, 2013, 09:28:26 pm »
@ Leledumbo + User137 : Many thanks
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

 

TinyPortal © 2005-2018