Mercurial > projects > ldc
annotate tests/mini/stdiotest.d @ 445:cc40db549aea
Changed the handling of variadic intrinsics a bit.
Removed the -fp80 option and made real be 80bit floats on X86, this is what the D spec really says it should be and fixes a bunch of issues.
Changed the handling of parameter attributes to a bit more generalized approach.
Added sext/zext attributes for byte/short/ubyte/ushort parameters, fixes #60 .
Parameter attribs now properly set for intrinsic calls if necessary.
Made the tango.math.Math patch less intrusive.
Fixed/added some mini tests.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Fri, 01 Aug 2008 17:59:58 +0200 |
parents | 1bb99290e03a |
children |
rev | line source |
---|---|
22
a6360e68134a
[svn r26] * Fixed templates defining a constant value
lindquist
parents:
diff
changeset
|
1 module stdiotest; |
a6360e68134a
[svn r26] * Fixed templates defining a constant value
lindquist
parents:
diff
changeset
|
2 |
a6360e68134a
[svn r26] * Fixed templates defining a constant value
lindquist
parents:
diff
changeset
|
3 import std.stdio; |
a6360e68134a
[svn r26] * Fixed templates defining a constant value
lindquist
parents:
diff
changeset
|
4 |
131 | 5 T typed(T)(T x) |
6 { | |
7 return x; | |
8 } | |
9 | |
22
a6360e68134a
[svn r26] * Fixed templates defining a constant value
lindquist
parents:
diff
changeset
|
10 void main() |
a6360e68134a
[svn r26] * Fixed templates defining a constant value
lindquist
parents:
diff
changeset
|
11 { |
131 | 12 /*char[] str = "hello"; |
13 writefln(str); | |
14 | |
15 writefln("hello world");*/ | |
16 | |
17 char[] fmt = "%s"; | |
18 writefln(2.0f); | |
19 | |
20 /*{writefln(typed!(byte)(1));} | |
21 {writefln(typed!(short)(2));} | |
22 {writefln(typed!(int)(3));} | |
23 {writefln(typed!(long)(-4));} | |
24 {writefln(typed!(ulong)(5));} | |
25 {writefln("%f", typed!(float)(6));} | |
26 {writefln("%f", typed!(double)(7));} | |
27 {writefln("%f", typed!(real)(8));}*/ | |
22
a6360e68134a
[svn r26] * Fixed templates defining a constant value
lindquist
parents:
diff
changeset
|
28 } |