1. Re: No more platform(), conditional includes, conditional functions, condit

Jeremy Cowgar wrote:
> 
> > 
> > ex --define=debug test.ex
> > 
> 
> Yes, it can:
> 
> ex -Ddebug -Djohndoe -Dsimple test.ex
> 

More over, I want to stress that this is *not* a pre-processor. A pre-processor
will load the source file, scan from top to bottom looking for pre-processor
keywords. The pre-processor would then alter the code as necessary and the pass
it on to the parser.

That is not what ifdef does. Ifdef is a compile time execution keyword. It does
not inject any of it's own code into the IL or C translated output. It does not
inject any of the "FALSE" defines into IL or C code.

What this means is that the ifdef keyword causes no speed change in Euphoria
like a pre-processor would. If you use it, you will get a performance hit
equivalent to executing 1 if statement 1 time (well, per condition you have of
course). And again, that happens at parse time, not every iteration, because it's
never injected into IL or C. That is important to note. It's not a pre-processor.

--
Jeremy Cowgar
http://jeremy.cowgar.com

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu