Reputation: 12138
How do I most conveniently print array of numeric values in D? Are there such highlevel overloads or do I have to implement them myself?
In my case I just want to display the contents of data
to check the result of.
double data[] = [ 11,2,3,4,6,1,34 ];
std.algorithm.sort(data);
Upvotes: 2
Views: 120
Reputation: 2229
Just import std.stdio
and use writeln()
on the array.
import std.stdio;
void main()
{
auto a = [1, 2, 3, 4];
writeln(a);
}
Upvotes: 7