相关疑难解决方法(0)

如何将.fs文件编译为.exe?

我没有找到将简单文件 (.fs) 编译为 .exe 的方法。我尝试了这个例子,但它不起作用:

  1. 在文件 dolphin.fs 中:

    let longBeaked = "Delphinus capensis"
    let shortBeaked = "Delphinus delphis"
    let dolphins = [ longBeaked; shortBeaked ]
    printfn "Known Dolphins: %A" dolphins
    
    Run Code Online (Sandbox Code Playgroud)
  2. 您现在可以将此代码编译为 EXE,如下所示:

    C:\fsharp> fsc dolphins.fs
    C:\fsharp> dir dolphins.exe
    
    Run Code Online (Sandbox Code Playgroud)

但是当我这样做时,“C:\fsharp”中的“:”出现错误

compiler-construction f#

6
推荐指数
1
解决办法
4746
查看次数

标签 统计

compiler-construction ×1

f# ×1