1. ifdef handling

I was just playing around and tried the following:

ifdef WIN32 then puts(1,"WIN32") elsedef puts(1,"NOT WIN32") y end ifdef 
ifdef WIN32 then constant X = 0 elsedef constant Y = 0 end ifdef 
constant ifdef WIN32 then X2 elsedef Y2 end ifdef = 0  

It forces a line break after elsedef and rejects the constant as invalid use of a reserved word. Thoughts, anyone?

new topic     » topic index » view message » categorize

2. Re: ifdef handling

petelomax said...

I was just playing around and tried the following:

ifdef WIN32 then puts(1,"WIN32") elsedef puts(1,"NOT WIN32") y end ifdef 
ifdef WIN32 then constant X = 0 elsedef constant Y = 0 end ifdef 
constant ifdef WIN32 then X2 elsedef Y2 end ifdef = 0  

It forces a line break after elsedef and rejects the constant as invalid use of a reserved word. Thoughts, anyone?

For the third (the issue with the constant), see http://openeuphoria.org/ticket/283.wc

In short, ifdef separates complete statements, and can't be used inside a statement.

I'm not sure why elsedef would force a line break. That might be a bug left over due to some hacky issues in parsing ifdef..then...else...end ifdef statements (prior to the move to rename else to elsedef to avoid those very problems).

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu