Haxe: Are there defines indicating the current compilation target? -


does haxe have defines indicating current compilation target, can used conditional compilation?

yes, every haxe target has it's own define.

#if js    trace("js"); #elseif php   trace("php"); #elseif cpp   trace("cpp"); #elseif java   trace("java"); #elseif python   trace("python"); #elseif neko   trace("neko"); #elseif sys   trace("sys"); #elseif flash   trace("flash"); #elseif cs   trace("cs"); #elseif macro   trace("macro"); #end 

you can find more build-in compilation flags here:
http://haxe.org/manual/lf-condition-compilation-flags.html

more info conditional compilation:
http://haxe.org/manual/lf-condition-compilation.html


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -