On Sun, Feb 25, 2018 at 06:22:03AM +0000, psychoticRabbit via 
Digitalmars-d-learn wrote:
[..]
>     printArray(doubleArr); // why is it printing ints instead of doubles??
[...]
> void printArray(T)(const ref T[] a) if (isArray!(T[]))
> {
>     foreach(t; a)
>         writeln(t);

Try:

        writefln("%.3f", t);

instead.


> }
> 
> ---------------------------------


T

-- 
Dogs have owners ... cats have staff. -- Krista Casada

Reply via email to