Inform - Support - Patches

About Patches  

Compiler  
Library  

DM4 Errata  

Issue C62107

Nested IFNDEF...IFNOT...ENDIF fails
Submitted by: Roger Firth     Appeared in: Compiler 6.21 or before     Fixed in: Compiler 6.30
Problem

If you nest the conditional compilation directives IFNDEF...IFNOT...ENDIF in certain configurations, the compiler complains "Error: Second 'Ifnot' for the same 'If...' condition". For example, the error is reported for the marked IFNOT, although there is nothing actually wrong with the code.

  Constant YYY;

  IfNDef XXX;
      IfNDef YYY;
          !
      IfNot;
          IfNDef ZZZ;
              !
          IfNot;
              !
          EndIf;
      EndIf;
  IfNot;      ! This line reported as wrong
      !
  EndIf;
Solution

As a workaround, recast the conditions (for example, using IFDEF instead of IFNDEF), remove IFNOTs by employing complementary IFDEFs and IDNDEFs, or use the bi-platform Glulx compiler (without the -G switch), where this bug has been fixed.


Last updated 2 May 2008. The librarian in charge of this page is Roger Firth. Please email any comments, suggestions or corrections to roger@firthworks.com.