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 site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation. Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Roger Firth.