Re: preprocessor
- Posted by Tone Škoda <tskoda at email.si> Oct 27, 2004
- 586 views
Robert Craig wrote: > The new 2.5 Translator will completely remove a block of code such as: > }}} <eucode> > if expr then > ... > -- lots of statements > ... > end if > </eucode> {{{ > whenever it can see at compile-time that > expr always evaluates to 0 (FALSE). That looks good, I'll use it. I have a question: I use this: integer Debug Debug = true global procedure assert (integer be_true) if Debug then if be_true = false then ... tell user assert was called ... end if end if end procedure I would prefer to use assert (length (smth) > length (smth_else)) than if Debug then assert (length (smth) > length (smth_else)) end if So, will translator also remove calls to routines which do nothing, like assert() in non-debug mode? assert's argument also slows things down because it has to be evaluated.