This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <wchar.h> | |
int main(void) | |
{ | |
printf("%d\n", sizeof(wchar_t)); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[~]$ ed test.d | |
test.d: No such file or directory | |
i | |
import std.stdio; | |
void main() | |
{ | |
string ☪ = "☺"; | |
writeln(☪); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r f7d31065be69 d/dmd2/aggregate.h | |
--- a/d/dmd2/aggregate.h Sat Jan 16 16:24:03 2010 -0500 | |
+++ b/d/dmd2/aggregate.h Fri Feb 05 10:44:37 2010 +1300 | |
@@ -127,7 +127,7 @@ | |
void semantic(Scope *sc); | |
void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | |
char *mangle(); | |
- char *kind(); | |
+ const char *kind(); | |
int needOpAssign(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.stdio; | |
void main() | |
{ | |
foreach (line; cast(string) stdin.byLine) {} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new st((void delegate(SomePropType, OtherPropType) yield) | |
{ | |
foreach (c; SomeCollection) { | |
if (c.SomeProperty >= someValue * 2) continue; | |
yield(c.SomeProperty, c.OtherProperty); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new st((void delegate(SomePropType, OtherPropType) yield) | |
{ | |
foreach (c; SomeCollection) { | |
if (c.SomeProperty >= someValue * 2) continue; | |
yield(c.SomeProperty, c.OtherProperty); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module dls.model.citytree; | |
import dls.util.rect; | |
enum Quad | |
{ | |
NE, | |
NW, | |
SW, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module dsext; | |
/* | |
Let's try adding a new object type to DMDScript. | |
I shall call my new object... Monkey! | |
It shall have a property called "furColor" | |
with the value "brown". | |
It shall have a property called "hungry" | |
with the value 'true'. | |
It shall also have a method called "eatBanana" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int global; | |
void main() | |
{ | |
int i = 0; | |
int j = 5; | |
int k = i + j; | |
k = k * 2; | |
return k; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.stdio; | |
import std.date; | |
void main() | |
{ | |
auto localtime = UTCtoLocalTime(getUTCtime()); | |
writeln("The current time is " ~ std.date.toString(localtime)); |
OlderNewer