Code Coverage Analysis, how do I skip (ignore) a line?

2015-07-21 Thread antropod via Digitalmars-d-learn
I want my coverage analysis to be 100%, how do I skip lines like assert(0); from being counted?

Re: Formatted output of range of tuples

2014-10-08 Thread antropod via Digitalmars-d-learn
On Wednesday, 8 October 2014 at 21:34:54 UTC, anonymous wrote: You can turn the tuples into ranges with `only`: writef("%(%(%s %)\n%)", zip(indexes, source).map!(t => only(t.expand))); That works for me, thanks. By the way my compiler is DMD 2.066.0

Formatted output of range of tuples

2014-10-08 Thread antropod via Digitalmars-d-learn
Hello! Consider this code: +++ import std.stdio; import std.range; import std.algorithm; void printIndexedArray1(T, Range)(T[] source, Range indexes) { foreach(row; zip(indexes, source)) { foreach(col; row) { write(col, " ");