Windows PowerShell 会话中使用 FSharp 代码编译器
2020-12-13 05:30
标签:des style http color 使用 os io art Windows PowerShell 会话中使用 FSharp 代码编译器
$fSharpCode= @" moduleTest let HelloWorld =
"Hello World!!!!" printfn "%s" HelloWorld let rec Loop n =
seq [
if n
()
else
yield n;
yield! Loop (n-1)
] |> Seq.sort printfn "%A" (Loop 5) let rec factorial x = if x = 0 then 1 else x * (factorial (x - 1)) "@ #> $env:Path=$env:Path+";C:\ProgramFiles\Microsoft
SDKs\F#\3.0\Framework\v4.0" Add-Type-PathC:\FSharpPowerPack-4.0.0.0\bin\FSharp.Compiler.CodeDom.dll $provider=New-ObjectMicrosoft.FSharp.Compiler.CodeDom.FSharpCodeProvider $fSharpCode=Get-Content"C:\Users\tj\Desktop\loop.fs"|
Out-String $fsharpType=Add-Type
-TypeDefinition$fSharpCode-CodeDomProvider$provider-PassThru|where
{ $_.IsPublic } $fSharpType::HelloWorld $fSharpType::Loop(9) $fsharpType::factorial(9) ############ $env:Path=$env:Path+";C:\ProgramFiles\Microsoft
SDKs\F#\3.0\Framework\v4.0" Add-Type-PathC:\FSharpPowerPack-4.0.0.0\bin\FSharp.Compiler.CodeDom.dll $provider=New-ObjectMicrosoft.FSharp.Compiler.CodeDom.FSharpCodeProvider $fSharpCode2=Get-Content"C:\Users\tj\Desktop\Line.fs"|
Out-String $fsharpType=Add-Type
-TypeDefinition$fSharpCode2-CodeDomProvider$provider-ReferencedAssemblies @("System.Drawing";"C:\fsharp-FSharp.Charting\bin\FSharp.Charting.dll")-PassThru|where
{ $_.IsPublic } Add-Type-Path"C:\fsharp-FSharp.Charting\bin\FSharp.Charting.dll" $fsharpType::Line ###################### $env:Path=$env:Path+";C:\ProgramFiles\Microsoft
SDKs\F#\3.0\Framework\v4.0" Add-Type-PathC:\FSharpPowerPack-4.0.0.0\bin\FSharp.Compiler.CodeDom.dll $provider=New-ObjectMicrosoft.FSharp.Compiler.CodeDom.FSharpCodeProvider $fSharpCode3=Get-Content"C:\Users\tj\Desktop\Data.fs"|
Out-String $fsharpType=Add-Type
-TypeDefinition$fSharpCode3-CodeDomProvider$provider-ReferencedAssemblies @("C:\FSharp.Data\bin\FSharp.Data.dll")-PassThru
| where {
$_.IsPublic } Add-Type-PathC:\FSharp.Data\bin\FSharp.Data.dll $fsharpType::http("http://www.baidu.com") $fsharpType::http("http://www.federalreserve.gov/datadownload/Output.aspx?rel=H15&series=bcb44e57fb57efbe90002369321bfb3f&lastObs=&from=&to=&filetype=csv&label=include&layout=seriescolumn") Windows PowerShell 会话中使用 FSharp 代码编译器,搜素材,soscw.com Windows PowerShell 会话中使用 FSharp 代码编译器 标签:des style http color 使用 os io art 原文地址:http://blog.csdn.net/hadstj/article/details/38178479
上一篇:算法竞赛进阶指南 0x00
下一篇:Java常用工具——java集合
文章标题:Windows PowerShell 会话中使用 FSharp 代码编译器
文章链接:http://soscw.com/essay/31180.html