Files
ldc/test/vararg5.d
Tomas Lindquist Olsen 599f879149 [svn r316] Fixed array slice assignments like: int[] arr = ...; arr[] = 42;
There was problems with most non basic types...
Added an option to premake so we can do: premake --target gnu --no-boehm
to disable the Boehm GC.
2008-06-23 14:48:42 +02:00

14 lines
240 B
D

module vararg5;
import tango.core.Vararg;
extern(C) int printf(char*, ...);
void func(...)
{
char[] str = va_arg!(char[])(_argptr);
{printf("%.*s\n", str.length, str.ptr);}
}
void main()
{
char[] str = "hello";
func(str);
}