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 17 April 2013. This web site has not been fully supported since April 2008. Information may be out of date. This page was originally managed by Roger Firth.