2007-06-05
DotMars 版 Hello World
关键字: Dotmars D
DotMars 已经具有初步的样子了,特别发帖庆祝。
DotMars 第一个范例程序(dotmars/samples/io/console.d):
编译:
DotMars 第一个范例程序(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
- 进入 dotmars 目录,执行 dsss build 和 dsss install
- 进入 samples 目录,执行 dsss build
- 执行 dotmars/samples/io 目录下的 console.exe(Windows) 或 console(Linux).
评论
oldrev
2007-07-23
通过迭代器进行数组和链表的互操作性演示:
http://dotmars.googlecode.com/svn/trunk/samples/base/collections.d
http://dotmars.googlecode.com/svn/trunk/samples/base/collections.d
oldrev
2007-07-20
新加了 iterator 和 双向链表类 dotmars.base.collection.list.List
oldrev
2007-07-13
昨天我刚好修改了这个地方,以前一直是在linux下编译,没有发现这个错误
tuja
2007-07-13
编译错误:
time.d(1033) void has no value
可能是因为 GetSystemTimeAsFileTime(&ft)函数没有返回值,不能进行比较
把这行注释掉就可以通过编译了。
DMD1.018
time.d(1033) void has no value
可能是因为 GetSystemTimeAsFileTime(&ft)函数没有返回值,不能进行比较
把这行注释掉就可以通过编译了。
DMD1.018
oldrev
2007-06-23
什么事件?这个项目目前还处于非常初级的阶段,而且D是一种新语言,我的经验有限,而且也没有太多时间开发.
所以,一切答案都在代码里,就像 Linux他爹说的, Read the f**king source
所以,一切答案都在代码里,就像 Linux他爹说的, Read the f**king source
niijyeni
2007-06-23
请问这个支持事件吗?
niijyeni
2007-06-23
连接速度很低,不过最终还是下载下来了,花了很长时间
oldrev
2007-06-23
为什么下载不了?
niijyeni
2007-06-23
下载不了啊,
oldrev
2007-06-05
不支持了,完全是 .Net 风格的。
qiezi
2007-06-05
还支持printf风格的format吗?
tomqyp
2007-06-05
祝贺~
发表评论
- 浏览: 93646 次
- 性别:

- 来自: 昆明

- 详细资料
搜索本博客
我的相册
Screenshot
共 1 张
共 1 张
最近加入圈子
最新评论
-
Range Coding 的 D 实现 ...
引用oldrev 2008-01-12LZMA SDK 只是一个 LZMA 算法 ...
-- by oldrev -
D 静态数组初始化大bug ...
看看日期好伐?
-- by oldrev -
D新闻组里的天才代码
没看过产生的汇编代码,测试了是可行的。如果用宏来实现就完美了
-- by oldrev -
D新闻组里的天才代码
这里的lazy根本没推后evaluate吧? 这个的优化我看在于用了一条指令来决 ...
-- by DavidL -
D 静态数组初始化大bug ...
dmd 1.028编译成功!
-- by honglang13






评论排行榜