comparison test/vararg5.d @ 131:5825d48b27d1 trunk

[svn r135] * Merged DMD 1.025 * * Fixed a minor linking order mishap * * Added an command line option -annotate * * Fixed some problems with running optimizations * * Added std.stdio and dependencies to lphobos (still not 100% working, but compiles and links) * * Fixed problems with passing aggregate types to variadic functions * * Added initial code towards full GC support, currently based on malloc and friends, not all the runtime calls the GC yet for memory * * Fixed problems with resolving nested function context pointers for some heavily nested cases * * Redid function argument passing + other minor code cleanups, still lots to do on this end... *
author lindquist
date Fri, 04 Jan 2008 01:38:42 +0100
parents
children d9d5d59873d8
comparison
equal deleted inserted replaced
130:a7dfa0ed966c 131:5825d48b27d1
1 module vararg5;
2 import std.stdarg;
3 void func(...)
4 {
5 char[] str = va_arg!(char[])(_argptr);
6 {printf("%.*s\n", str.length, str.ptr);}
7 }
8 void main()
9 {
10 char[] str = "hello";
11 func(str);
12 }