Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

F# compiler directive for 'symbol not defined'

Tags:

f#

Is there a way to specify that a symbol should not be defined, in an F# #if directive? Something like this:

#if not COMPILED
// do script stuff here
#endif

Though the above is a syntax error. The same thing is accomplished by

#if COMPILED
#else
// do script stuff here
#endif

but I wonder if there's a neater way?

(edit: I'm asking about the general case, not the particular case of COMPILED/SCRIPT. Sorry, I forgot to mention that from the beginning.)

like image 981
John Reynolds Avatar asked Feb 21 '11 20:02

John Reynolds


People also ask

What is Mtouch Facebook?

Facebook Touch is an advanced Facebook app that has many distinct features. H5 apps developed it as an app made especially for touchscreen phones. Available and applicable across all smartphones, Facebook Touch offers a fine user interface and serves as an alternative to the typical Facebook App.


1 Answers

No, there's no neater way, according to MSDN

like image 184
Robert Jeppesen Avatar answered Oct 24 '22 01:10

Robert Jeppesen