Permalink
Browse files

Merge pull request #53 from AndrejMitrovic/issue4550

Separate D1/D2 writeln/writefln and string/char[] distinction
  • Loading branch information...
2 parents 81225ca + bdbd5b7 commit 29fb757f1806aec8dd89b9e13eeb47ec7a6b1069 @WalterBright WalterBright committed Jan 15, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 statement.dd
View
@@ -494,14 +494,14 @@ foreach (int i, char c; a)
)
--------------
-char[] a = "\xE2\x89\xA0".dup; // \u2260 encoded as 3 UTF-8 bytes
+char[] a = "\xE2\x89\xA0"$(V2 .dup); // \u2260 encoded as 3 UTF-8 bytes
foreach (dchar c; a)
{
writefln("a[] = %x", c); // prints 'a[] = 2260'
}
-dchar[] b = "\u2260"d.dup;
+dchar[] b = "\u2260"d$(V2 .dup);
foreach (char c; b)
{
@@ -553,9 +553,9 @@ $(CONSOLE
)
--------------
-double[string] a; // $(I index) type is string, $(I value) type is double
+double[$(V1 char[])$(V2 string)] a; // $(I index) type is $(V1 char[])$(V2 string), $(I value) type is double
...
-foreach (string s, double d; a)
+foreach ($(V1 char[])$(V2 string) s, double d; a)
{
writefln("a['%s'] = %g", s, d);
}
@@ -737,7 +737,7 @@ void main() {
foreach (T; TL)
{
- writeln(typeid(T));
+ write$(V1 f)ln(typeid(T));
}
}
-----

0 comments on commit 29fb757

Please sign in to comment.