Hi,

If I remember correctly, you can use:

1
2
3
4
5
6
7
8
9
#if COMPILED


// some code


#endif

By on 8/25/2008 11:09 AM ()

That behavior comes close, but is not exact. When i compile (fsc -a) and then load that module (#r) in the interpreter the code gets executed. The behavior with the INTERACTIVE macro/definition (?) is analogous.

By on 8/25/2008 11:20 AM ()

You could test to see if the executing process is fsi.

1
2
open System.Diagnostics
let interactive = Process.GetCurrentProcess().MainModule.ModuleName = "fsi.exe"
By on 8/26/2008 2:03 AM ()

thank you.

By on 8/26/2008 8:26 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