F# helloworld
fsharp吧
全部回复
仅看楼主
level 6
凌寒树 楼主
F# Hello Word 程序     
(* This is commented *)  
(* Sample hello world program *)    
printfn "Hello World!"    
F# Winforms 程序
#light      (* Sample Windows Forms Program *)     
(* We need to open the Windows Forms library *)     
open System.Windows.Forms     
(* Create a window and set a few propertis *)  
   
let form = new Form
(Visible=true, TopMost=true, Text="Welcome to F#")    
(* Create a label to show some text in the form *)     
let label =      let
temp = new Label()     
let x = 3 + (4 * 5)     
(* Set the value of the Text*)     
temp.Text <- sprintf "x = %d" x     
(* Remember to return a value! *)     
temp     
(* Add the label to the form *)     
do form.Controls.Add(label)     
(* Finally, run the form *)    
[<STAThread>]     
do Application.Run(form)
2010年08月29日 03点08分 1
level 8
写一个hello world就这么长[汗]
2011年05月31日 10点05分 4
level 6
凌寒树 楼主
其实不长大部分是注释 而且是有gui的程序 你想想有C语言协议股窗口多长啊
#light
open System.Windows.For***et form = new Form
(Visible=true, TopMost=true, Text="Welcome to F#")
let label = let
temp = new Label()
let x = 3 + (4 * 5)
temp.Text <- sprintf "x = %d" x
temp
do form.Controls.Add(label)
[<STAThread>]
do Application.Run(form)

2011年05月31日 10点05分 5
level 8
是啊~~好像没有包含其他文件,但F#是.NET平台...
2011年05月31日 10点05分 6
level 6
凌寒树 楼主
……
那win32程序还是 windows平台需要windows api支持那
2011年05月31日 12点05分 7
1