Just use

1
#if DEBUG

We'll add an example to the manual

Cheers!

Don

By on 7/24/2006 9:54 AM ()

Don,

Thanks for the reply. A few questions though.

1) The syntax highlighting does not appear in the lines between #if and #endif (that is why I was not sure whether or not I was doing the correct thing.) For example, if I use --define DEBUG in the command line, and the following in my code

1
2
3
#if DEBUG
#r "NUnit.Framework.dll";;
#endif

if the dll is not found, it will produce an error. Other than that, I have no way of knowing whether the code is being included or not. Is this correct?

2) Is there an #else command in F#? Usually I like to include one set of dll for my debugging code and another set for my runtime code. I can easily work around the problem though.

Thanks.

Regards

Chris

By on 7/25/2006 8:15 AM ()

Hi Chris,

You are right - alas, alas the lexing highlighting is not yet sensitive to #defines. We'll look into fixing that, or at least providing some workaround.

Yes, there is a #else. Some issues with nested #if/#else were fixed in the latest release.

Cheers!

Don

By on 7/25/2006 4:44 PM ()

Hello is there a way to make a #define in the source code itself? and with a value like for example "#define CONSTANT 2" ?

By on 6/29/2008 10:02 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper