Re: vfprintf equivalent in D

2012-02-23 Thread Sarath Kumar
Thanks Jonathan and Teoh. I just have to pass the var args in my function to writefln and Variadic templates is the right solution for me. -- Thanks, Sarath

Re: vfprintf equivalent in D

2012-02-23 Thread H. S. Teoh
On Fri, Feb 24, 2012 at 05:22:58AM +, Sarath Kumar wrote: > Hi, > > Is there an equivalent to vfprintf(const char *fmt, , va_list ap) in D? [...] You don't need one. You can just write: void myWritelnWrapper(T...)(T args) { ... // insert your own processing here,

Re: vfprintf equivalent in D

2012-02-23 Thread Jonathan M Davis
On Thursday, February 23, 2012 21:38:27 Jonathan M Davis wrote: > On Friday, February 24, 2012 05:22:58 Sarath Kumar wrote: > > Hi, > > > > Is there an equivalent to vfprintf(const char *fmt, , va_list ap) in D? > > If you're dealing with C variadics, then your going to need to use C > functions.

Re: vfprintf equivalent in D

2012-02-23 Thread Jonathan M Davis
On Friday, February 24, 2012 05:22:58 Sarath Kumar wrote: > Hi, > > Is there an equivalent to vfprintf(const char *fmt, , va_list ap) in D? If you're dealing with C variadics, then your going to need to use C functions. D doesn't just recreate C functions (at least, the standard library doesn't

vfprintf equivalent in D

2012-02-23 Thread Sarath Kumar
Hi, Is there an equivalent to vfprintf(const char *fmt, , va_list ap) in D? -- Thanks, Sarath