ifndef - Conditional exclusion of code in Swift -


i trying exclude parts of swift file specific target. yet did not find replacement of #ifndef objective-c directive , if use form of kind:

#if taxi_coops func pippo(){     println("pippo"); } #else func triggeractivelocationupdate(entering:bool){} #endif 

the preprocessor totally ignores directive , tries compile triggeractivelocationupdate. please note #if taxi_coops directive respected in other parts of same file.

is there way exclude pieces of code in swift and/or why fix not work?

in swift, use #if ! replacement #ifndef, e.g.:

#if !os(osx)     // compiled when not on os x #endif 

Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Restarting Supervisor and effect on FlaskSocketIO -

android - Format a french phone number -