I have an array of reals that I want to format with writefln, but the
precision field needs to be passed in a variable. For a single real, it
would be writefln(%.*f, precision, x); but when I try this:
int precision = ...;
real[] array = ...;
writefln(%(%.*f, %),
On 10/14/2012 10:43 PM, H. S. Teoh wrote:
I have an array of reals that I want to format with writefln, but the
precision field needs to be passed in a variable. For a single real, it
would be writefln(%.*f, precision, x); but when I try this:
int precision = ...;
real[] array =