Mercurial > projects > ldc
annotate tests/mini/mainargs1.d @ 1647:638a823ace45
Strange workaround for returning from within 'void main()'. The new dmdfe sets the ReturnStatement->exp to null. Fixed bug #391.
author | Kelly Wilson <wilsonk cpsc.ucalgary.ca> |
---|---|
date | Wed, 10 Mar 2010 19:35:14 -0700 |
parents | 1bb99290e03a |
children |
rev | line source |
---|---|
91 | 1 module mainargs1; |
2 | |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
91
diff
changeset
|
3 extern(C) int printf(char*,...); |
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
91
diff
changeset
|
4 |
270
d9d5d59873d8
[svn r291] Fixed a bunch of the old Phobos tests to work with Tango.
lindquist
parents:
133
diff
changeset
|
5 void main(char[][] args) |
91 | 6 { |
7 foreach(v; args) | |
8 { | |
9 printf("%.*s\n", v.length, v.ptr); | |
10 } | |
11 } |