[OpenBIOS] Nested [IFDEF]s not working?

Segher Boessenkool segher at kernel.crashing.org
Sat Dec 4 03:26:04 CET 2010


>> I don't really understand the code in forth/lib/preprocessor.fs but it
>> looks as if some state is held in three variables. Also the [ELSE]
>> case handling in the [IF] loop looks unintuitive...
>
> It looks like a bastardised version of the example code in the standard.
> It only handles nested [IF] , not [IFDEF] etc.  It wouldn't be hard to
> add it (just add and extra case, where it does a string compare for
> [IF] ).

Or, write it as

[DEFINED] bla [IF]
[DEFINED] blub [IF]
...
[ELSE]

etc.


Segher




More information about the OpenBIOS mailing list