It should **not** work because the exclamation point "!" is in the wrong place!

Before:
Code
if(is(!DEMO)) 
    {
    quit();
    }
After:
Code
if(!is(DEMO)) 
    {
    quit();
    }


Here's a better code sample:
Code
void run(){
	if(is(DEMO)){
		printf("\nDEMO flag is ON");
	}
	else{
		printf("\nDEMO flag is OFF");
	}
	quit("#Done.");
}


Also, the description of DEMO is:
Quote
A demo account is selected through the [Account] scrollbox.
It does not care what mode you are in.