F# Interactive Pad and Program Editor inside Reflector.
1. The following screen shot shows testing code snippet inside interactive pad and configuring options.
Seirpinski Triangle code inside the pic is written by
2. Adding assembly reference (#r fsi command) and opening namespace can be done via context menu of Assembly List Panel of Reflector. See the following screen shot.
3. There are some shell level custom commands. For example, you can change background color by typing the following command inside interactive pad.
#bgc “black” ;;
The following describes custom commands and their definitions.
“color name|hex string” – changes background color
#fgc “color name|hex string” – changes foreground color
#fz “float|integer number” – changes font size
#hl “on|off” – turns on or off syntax highlightening
#cls – cleans the screen
#q or #reset - restarts fsi session
In Program Editor, we can write, build and run F# program. The following brief tutorial will discuss using Program Editor.
1. Write the following simple WPF program inside Program Editor.
let window = new Window(Title = "Hello")
window.ShowDialog() |> ignore
2. To run the program you can press F5 or click on Run
will get the error in the output window ‘cause the necessary assembly references are not fed to F# compiler. See the following screen shot.
3. Adding Assembly References can be done in two ways – one is via Context Menu and the other is via Assembly Reference dialog. See the following screen shot.
4. After adding assembly references (PresentationCore.dll and PresentationFramework.dll in our case), they will be shown inside Assembly Reference dialog as follow. Now you can run the program successfully.
5. If you chose to build the program by pressing (Ctrl+Shift+B) or clicking on Build
program will be compiled and the output assembly will be loaded into Reflector.