Re: [Lazarus] Conditional code based on Lazarus/LCL version

2016-09-22 Thread Mattias Gaertner
On Thu, 22 Sep 2016 22:25:23 +0100
Denis Kozlov  wrote:

> On 22/09/2016 22:02, Mattias Gaertner wrote:
> > See unit lclversion.  
> 
> Thanks! Somehow I just couldn't find it.
> 
> Is it theoretically possible to implement a compile time define for 
> Lazarus version?

You can use it at compile time:

uses lclversion;
{$IF lcl_minor=7}
...

It is just that codetools do not support such constants. The compiler
does.

Mattias
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Conditional code based on Lazarus/LCL version

2016-09-22 Thread Denis Kozlov

On 22/09/2016 22:02, Mattias Gaertner wrote:

See unit lclversion.


Thanks! Somehow I just couldn't find it.

Is it theoretically possible to implement a compile time define for 
Lazarus version?


Perhaps an extra define that Lazarus passes to compiler automatically?

Thanks,
Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Conditional code based on Lazarus/LCL version

2016-09-22 Thread Mattias Gaertner
On Thu, 22 Sep 2016 21:30:51 +0100
Denis Kozlov  wrote:

> Hi,
> 
> Is there something like FPC_VERSION define but for Lazarus or LCL, e.g. 
> LAZARUS_VERSION?

See unit lclversion.

Mattias
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus