Length comparison

Bill Baxter wbaxter at gmail.com
Tue Dec 5 01:05:53 PST 2006


This bit me just now:

     if (-1 < somearray.length) {
     }

Ouch.  Took me a while to figure out that that bit of code was the problem.

Is there some way to make these kind of bugs less likely or easier to find?

--bb



More information about the Digitalmars-d mailing list