is there a define which tells me if the current target is static ?

32 views
Skip to first unread message

Adrian Veith

unread,
Apr 28, 2016, 5:24:41 AM4/28/16
to Haxe
Sometimes I have the need to know if a not initialized Int or Float defaults to null or 0. Currently I use #if (neko|js) null #else 0 #end, which is bad because I forget about the other targets where this might be true. Better would be something like: #if int_defaults_null null #else 0 #end or even better a build in Int.default or Float.default.

Is there something like this already, which I haven't found ?
Reply all
Reply to author
Forward
0 new messages