After you’ve successfully downloaded and installed F# from Microsoft, it’s time
to begin having fun. One cool aspect of learning F# is using the Interactive
interpreter. F# Interactive allows you to enter F# code into a
command-line-esque program and have it evaluate immediately. No need to compile
and run. This is of course very similar to the Ocaml Toplevel and there are
other analogues in other languages.
So here are the steps for how you start her up (yes, the Interactive is a woman)
in Visual Studio 2005:
1.) From inside Visual Studio go to Tools -> Add-in Manager. You should get a
screen like this:
2.) Now check the box next to “F# Interactive for Visual Studio” and click “Ok”.
3.) The F# Interactive window should now appear:
Just for fun, lets test her out and enter the following F# code:
> printfn “testing her out”;;
We should see the following output from the Interactive:
testing her out
val it : unit = ()
We can see that it did print the string that we asked it to. But it also printed
some stuff below it that we didn’t ask for. Its pretty obvious that it’s telling
us some information about our line of code that it interpreted, but what? Don’t
worry for now. We’ll return to this later in the tutorial.