[OpenBIOS] Nested [IFDEF]s not working?

Andreas Färber andreas.faerber at web.de
Wed Dec 1 20:38:50 CET 2010


Hello,

A construct like:

[IFDEF] CONFIG_PPC
   [IFDEF] CONFIG_PPC64
     5
   [ELSE]
     4
   [THEN]
[ELSE]
   [IFDEF] CONFIG_SPARC64
     6
   [ELSE]
     3
   [THEN]
[THEN]

has been seen to return, e.g., 4 3 according to the debug word.

Is this nesting forbidden in Forth? Easily fixable? A better way to do  
this? I do want a final catch-all since returning no value would have  
unexpected results, and we currently do not have a define CONFIG_PPC32  
so that a concatenation of independent [IFDEF]...[THEN]s wouldn't work.

TIA,

Andreas



More information about the OpenBIOS mailing list