Which type it better to use for array's indices?

Jacob Carlborg via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Dec 4 06:09:02 PST 2015


On 2015-12-04 14:24, ref2401 wrote:

> For instance `find(float[] arr, float v)` may return -1 if `v` has not
> been found.

If "find" is returning an index, it could return arr.length to indicate 
it was not found.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list