View Issue Details

IDProjectCategoryView StatusLast Update
0030214LazarusIDEpublic2020-01-21 05:32
Reportertintinux Assigned ToMattias Gaertner  
Status assignedResolutionopen 
Product Version1.6 
Summary0030214: IFDEF + numeric identifier is always TRUE in IDE

When we test a compilation directive identifier containing only digits, the result is always TRUE.

The code between {$IFDEF 999} and {$ENDIF} or {IFNDEF 999} and {$ENDIF} is always appearing as active.

Thanks !

Steps To Reproduceprogram Project1;

{$mode objfpc}{$H+}

{$IFDEF 2017}
writeln ( 'in 2017' ); // visible

{$IFNDEF 2017}
writeln ( 'not in 2017' ); // visible

{$IFDEF Y2017}
writeln ( 'in Y2017' ); // disabled

{$IFNDEF Y2017}
writeln ( 'not in Y2017' ); // visible

Additional InformationThe issue is only for display in EDI.

The compilation is OK and takes care correctly of the test.
TagsNo tags attached.
Fixed in Revision
Attached Files


related to 0030109 confirmed IDE editor: {$if} doesn't evaluate constants 
related to 0036612 resolvedBart Broersma Codetool parses "{$IF ident > n}" wrong / Lazarus editor grayed out wrong section of const conditional compilation 


Bart Broersma

2016-05-31 22:36

developer   ~0092930

Fixed typo in summary.

Issue History

Date Modified Username Field Change
2016-05-31 19:38 tintinux New Issue
2016-05-31 22:35 Bart Broersma Relationship added related to 0030109
2016-05-31 22:36 Bart Broersma LazTarget => -
2016-05-31 22:36 Bart Broersma Note Added: 0092930
2016-05-31 22:36 Bart Broersma Summary IFDEF + numeric identifier is always TRUE in EDI => IFDEF + numeric identifier is always TRUE in IDE
2016-06-01 15:32 Mattias Gaertner Assigned To => Mattias Gaertner
2016-06-01 15:32 Mattias Gaertner Status new => assigned
2020-01-21 05:32 Martin Friebe Relationship added related to 0036612