That's slightly dangerous, because it doesn't work with all possible number formats. An entry of 0e0 (which is a valid zero) causes the comparison to disregard all non-zeros after it, as does two 0.0s (though it warns).
Of course if one knows that the entries are always exactly 0 or 1, it's quite an elegant solution.
In reply to Re^2: An exploration of higher-level-language approaches to the "First all-zero row in an NxN matrix" problem (goto Considered Harmful)
by moritz
in thread An exploration of higher-level-language approaches to the "First all-zero row in an NxN matrix" problem (goto Considered Harmful)
by davido
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |