Name: Anonymous 2011-12-31 17:17
Why do higher level languages not have a preprocessor?
It's a very powerful tool that every language should have.
It's a very powerful tool that every language should have.
public class Poo {
public static void main(String[] args) {
//#if defined(poo)
System.out.println("Poo is ${poo}");
//#else
System.out.println("Poo is not defined");
//#endif
//#if ${os_version} == 4.1
System.out.println("OS 4.1");
//#elif defined(poo) and ${os_version} >= 4.2
System.out.println("OS 4.2 and above");
System.out.println("Ooooh; compound expressions");
//#endif
}
}