国产一区二区精品久久_蜜桃狠狠狠狠狠狠狠狠狠_午夜视频精品_激情都市一区二区

當(dāng)前位置:首頁 > 網(wǎng)站舊欄目 > 學(xué)習(xí)園地 > 設(shè)計(jì)軟件教程 > DotMars 版 Hello World

DotMars 版 Hello World
2010-01-13 21:11:19  作者:  來源:

DotMars 版 Hello World
  
DotMars 已經(jīng)具有初步的樣子了,特別發(fā)帖慶祝。

DotMars 第一個(gè)范例程序(dotmars/samples/io/console.d):


D 代碼
 
module samples.io.console;  
  
import dotmars.io.console;  
  
void main()  
{  
    class Foo {  
        override char[] toString() {  
            return "Greeting!";  
        }  
    }  
     

    Console.writeLine("Hello World!");  
    Console.writeLineFormatted("Format object:  {0}", new Foo);  
    Console.writeLineFormatted("Format float:   PI={0:D4}", 3.1415926);  
    Console.writeLineFormatted("String & Integers: {2} {0:X} {1}", 0xFFFF, 123456, "Console");  
    Console.writeLineFormatted("Aligned String: =={0, 10}==", "DotMars");  
}  


編譯:

安裝配置好 DSSS
從 SVN 里下載代碼: svn export http://dotmars.googlecode.com/svn/trunk/ dotmars
進(jìn)入 dotmars 目錄,執(zhí)行 dsss build 和 dsss install
進(jìn)入 samples 目錄,執(zhí)行 dsss build
執(zhí)行 dotmars/samples/io 目錄下的 console.exe(Windows) 或 console(Linux).
Enjoy It!

更多信息請登陸http://61.191.27.74:802/ 最后,歡迎加入http://61.191.27.74:802/的會員


安徽新華電腦學(xué)校專業(yè)職業(yè)規(guī)劃師為你提供更多幫助【在線咨詢

抢占助学金名额