On 9/21/11 5:46 AM, James Kosin wrote:
This means one of the endpoints in the span don't attribute to the
length of the span. Is this correct? Does this mean a span with a
start and end say at 1,1 has no length? Or is it suppose to be 1?
I have similar problems when counting the number of locations to fill
for a memory block when doing (end - start) type arithmetic. What
happens is the length ends up being one short.
Usually we have an array of items, or a list. The start index is always the
item itself, e.g. 0 means the span begins just at the first item. The end
index is always the index of the item after the last item in the span.
So if you have just an array of length one, and want to define a span
which covers it, it would be start=0 and end=1 that results in end-start=1.
Jörn