[SOLVED] Stop compilation for LCL 1.8 and greater ? lazarus / 31-LCL ---------------------------------------------------------------------- guest58172 · 2017-12-18 06:26 Today i 've been surprised to see that it's not possible. I expected something like Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i {$IFDEF LCL_VERSION>1640}  {$STOP 'not compatible'}{$ENDIF}  But well, there's nothing like this that works for me ---------------------------------------------------------------------- molly · 2017-12-18 06:57 Does this example not work for you BBasile ? edit: e.g. something like: Code: [Select]{$IF lcl_fullversion>1080006}   {$STOP 'not compatible'} {$ENDIF} ---------------------------------------------------------------------- Thaddy · 2017-12-18 07:18 Yes, but note you will have to include lclversion: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program versioning;uses lclversion;begin  {$IF lcl_fullversion>1060400}    {$STOP 'not compatible'}  {$ENDIF}  writeln(LCL_FULLVERSION);end. ---------------------------------------------------------------------- guest58172 · 2017-12-18 07:21 Ah yeah this works. If think i've found this solution elsewhere but i trusted the highlighter too much (it always displays the STOP directive semi opaque) ---------------------------------------------------------------------- Thaddy · 2017-12-18 07:27 Quote from: BBasile on December 18, 2017, 08:21:56 amAh yeah this works. If think i've found this solution elsewhere but i trusted the highlighter too much (it always displays the STOP directive semi opaque) That's because in that case the version is ok. If you try the reverse ( <) the {$STOP} becomes bold... The ide merely shows you that the condition is not met. (If you ask me, it should be the other way around: bit confusing) ---------------------------------------------------------------------- molly · 2017-12-18 07:35 Also note that i've used the latest number so it was visible how the fullversion is constructed. If you would want to 'exclude' all 1.8 release candidates as well use a zero at the end. Whatever you decide falls into the 1.8 category, is up to yourself  For possible operators see here, as you original question was 1.8 and greater. ---------------------------------------------------------------------- guest58172 · 2017-12-18 13:47 The highlighting clearly doesn't work for IF. The following screenshot is captured on 1.6.4. I'd expect the STOP to be semi opaque, to the extent that this works for other preprocessor constructs (which i admit are certainly easier to evaluate from the highlighter side). ---------------------------------------------------------------------- molly · 2017-12-18 14:02 That is correct BBasile (or actually indeed wrong  ). It was reported in the bug-tracker a while ago edit: it's either this report or one of the other related bugs mentioned that i remembered.