capri, a script language

Home | Documentation | Releases | Sources | Contact

Specialization statement

A specialization statement is used when you want to execute something only on a specific system, architecture or for a specific target (these values can be set/checked using the respective cli flags. The syntax requires

on system windows {
	IO.println("I'm executed on windows!");

on system mac: IO.println("I'm executed on Mac OS!");

on target test, all {
	IO.println("I'm executed with both targets 'test' and 'all'!"); 

on architecture x86 {
	IO.println("This is executed on x86.");