Re: ifdef changes, 4.0 code may break.

new topic     » goto parent     » topic index » view thread      » older message » newer message
jeremy said...

Now, we have got some further changes on the ifdef system with this commit as well. It now supports simple conjunctions:

  1. and
  2. or

I wanted to mention (and I'll do this in the docs as well) that this is simple conjunctions. The ifdef system runs before the interpreter ever starts executing on the code, thus, we do not have at our disposal the entire expression system. The biggest limitation is no logical grouping. For instance, the following will NOT work:

ifdef (WIN32 or DOS32) and DEBUG then 
    -- debug code Windows or DOS 
end ifdef 

You can, however, nest ifdef's to achieve the same type of functionality, but not as eloquent.

ifdef WIN32 or DOS32 then 
    ifdef DEBUG then 
        -- debug code for Windows or DOS 
    end ifdef 
end ifdef 

We have all the syntax changes done necessary to support the ifdef system. I expect that in post 4.0, the ifdef system will see further enhancements such as logical grouping and comparison operators.

Jeremy

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu