Am 2016-04-16 um 18:36 schrieb Marco van de Voort:
>> Yes, but I could store indices in DWORD if they would be 1-based
>> and would not risk an exception if the index is "not valid" (which
>> would be 0 in this case while it's -1 for 0-based indices).
> You would have to check everywhere before decrementing. This can be annoying
> in loops. (it is that way in M2 btw, where the basetype is unsigned. Not
> happy with that)

I don't know what you mean.
A For-loop has it's limits anyway.
And when decrementing 'manually' I would stop if INDEX=0.
For 0-based arrays I would stop if INDEX=-1?
What would be different?
For 1-based arrays I would never get an index<0
because it stops at zero.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to