in reply to Re: nested #if directive matching matching
in thread nested #if directive matching matching
Actually, you *do* need a stack if you're going to properly handle the #else clauses. Otherwise, you won't remember the previous value(s) of the print vs. don't print states.
#if 0 this shouldn't print #if 1 nor should this #else nor this #end #else but this should #if 1 as should this #else but not this #end This should print, but where are you storing the information to know it without a stack? #else If you got that one right, howzabout this one? #end
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: nested #if directive matching matching
by choroba (Cardinal) on Jun 26, 2012 at 12:53 UTC | |
by Anonymous Monk on Jun 26, 2012 at 19:35 UTC | |
by GrandFather (Saint) on Jun 26, 2012 at 21:13 UTC |