[squeak-dev] Re: Pragmas for Controlling Compiler

Klaus D. Witzel klaus.witzel at cobss.com
Mon Nov 17 11:13:31 UTC 2008


On Mon, 17 Nov 2008 11:35:24 +0100, Martin Beck wrote:

> Hi,
>
> are there pragmas for controlling whether the compiler will include
> parts of the source code or not? For example:
>
> test
>    <compiler: off>
>    TestClass new doSomething.
>    <compiler: on>
>    TestClass new doSomething muchBetter.
>
> In fact, I want to use another compiler, which should only compile the
> first line, while the normal Squeak compiler should only compile the
> second. Any ideas?

Sure,

  OnOff
    ifTrue: [TestClass new doSomething]
    ifFalse: [TestClass new doSomething muchBetter]

/Klaus

> Regards,
> Martin
>

-- 
"If at first, the idea is not absurd, then there is no hope for it".  
Albert Einstein




More information about the Squeak-dev mailing list