Skip to main content
Lorenzo Nuvoletta
Inspiring
September 10, 2013
Question

ASC2 and Compiler Constants

  • September 10, 2013
  • 0 replies
  • 402 views

Looks like when using ASC2 with Air 3.8 Compiler Constants do not behave like they were before.

for example:

you can still do something like this:

if(CONFIG::myConst){

     //do stuff

}

else{

     //other stuff

}

Although now it will always compile both the if and the else.

So now the only way around this is doing something like this:

CONFIG::myConst

{

     //do stuff

}

CONFIG::oppositeOfMyConst

{

     //other stuff

}

Is there any workaround this?

This topic has been closed for replies.