官术网_书友最值得收藏!

Your first F# project

Going through installation screens and showing how to click Next would be discourteous to our reader's intelligence. Therefore we will skip step-by-step installation for other more verbose texts. Let's start with our first F# project in Visual Studio.

In the preceding screenshot, you can see the F# interactive window at the bottom. Here we have selected FILE | New | Project because we are attempting to open a new project of F# type. There are a few project types available, including console applications and F# library. For ease of explanation, let's begin with a Console Application as shown in the next screenshot:

Alternatively, from within Visual Studio, we can use FSharp Interactive. FSharp Interactive (FSI) is an effective tool for testing out your code quickly. You can open the FSI window by selecting View | Other Windows | F# Interactive from the Visual Studio IDE as shown in the next screenshot:

FSI lets you run code from a console which is similar to a shell. You can access the FSI executable directly from the location at c:\Program Files (x86)\Microsoft SDKs\F#\<version>\Framework\<version>\.

FSI maintains session context, which means that the constructs created earlier in the FSI are still available in the later parts of code.

The FsiAnyCPU.exe executable file is the 64-bit counterpart of F# interactive; Visual Studio determines which executable to use based on the machine's architecture being either 32-bit or 64-bit. You can also change the F# interactive parameters and settings from the Options dialog as shown in the following screenshot:

主站蜘蛛池模板: 屏东市| 沙田区| 泗洪县| 龙里县| 内黄县| 额敏县| 济南市| 平塘县| 古交市| 阿城市| 重庆市| 满洲里市| 吉首市| 永善县| 三原县| 大宁县| 依兰县| 农安县| 彰武县| 北宁市| 灵寿县| 金山区| 哈巴河县| 东港市| 榆中县| 河间市| 双柏县| 新宁县| 宣威市| 洞口县| 读书| 静乐县| 丹巴县| 舟山市| 陈巴尔虎旗| 囊谦县| 潞西市| 绍兴县| 兰州市| 长春市| 凤翔县|