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