<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
On 12-07-2018 12:51, frans via Lazarus wrote:<br>
<blockquote type="cite"
cite="mid:14fd8a57-950d-5d37-1703-b44bcc6abebd@quicknet.nl">I use
Lazarus 1.6.4 (temporarely) and lazarus 1.8.4 on Windows 10.
<br>
I need to use the LCL version but I can't get it to work properly.
<br>
I use the following code:
<br>
{$IFDEF LCL_FULLVERSION > 1080000}
<br>
{$ELSE}
<br>
{$ENDIF}
<br>
Compiling the program give me the message Warning include
environment "LCL_FULLVERSION" not found in environment. But this
is the way I fount on the lazarus forum.
<br>
What am I doing wrong? And where can I find a list of all Lazarus
environment variables?
<br>
<br>
</blockquote>
Where did you find this on the forum?<br>
Because you shouldn't use {$IFDEF } but {$IF } (because you are
using an <span style="color: rgb(0, 0, 0); font-family: "Times
New Roman"; font-size: medium; font-style: normal;
font-variant-ligatures: normal; font-variant-caps: normal;
font-weight: 400; letter-spacing: normal; orphans: 2; text-align:
start; text-indent: 0px; text-transform: none; white-space:
normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width:
0px; text-decoration-style: initial; text-decoration-color:
initial; display: inline !important; float: none;">expression<span>)</span></span><br>
<br>
So:<br>
{$IF LCL_FULLVERSION > 1080000}
<br>
{$ELSE}
<br>
{$ENDIF}
<br>
<br>
If you use {$IFDEF it will check if "LCL_FULLVERSION > 1080000"
is defined, which it isn't.<br>
<br>
Also see
<a class="moz-txt-link-freetext" href="http://www.math.uni-leipzig.de/pool/tuts/FreePascal/prog/node4.html">http://www.math.uni-leipzig.de/pool/tuts/FreePascal/prog/node4.html</a><br>
<br>
B.T.W. You need to include "uses lclversion" because LCL_FULLVERSION
is declared there (otherwise you get a ansistring error message).<br>
<br>
Some other constants:
<a class="moz-txt-link-freetext" href="http://lazarus-ccr.sourceforge.net/docs/lcl/lclversion/index-2.html">http://lazarus-ccr.sourceforge.net/docs/lcl/lclversion/index-2.html</a><br>
<br>
Grtz,<br>
Rik<br>
<br>
</body>
</html>