From: Colin A. <col...@ho...> - 2007-05-16 08:54:24
|
>From: Stefan Sieber <sie...@st...> > >Hi, > >The description of {DS_LINEAR}.after fooled me this morning ;) Andreas >Leitner >suggested to contact the gobo mailing list, so this is what I'll do now... > >Here's {DS_LINEAR}.after: > > after: BOOLEAN is > -- Is there no valid position to right of internal cursor? > do > Result := cursor_after (internal_cursor) > end > >The description "Is there no valid position to right of internal cursor?" >made >me think that 'after' is true whenever the cursor is on the _last_ item of >the linear (and not beyond). I assumed that "no valid position to the >right" >means that the next position will not point to an item of the container >anymore. That assumption is incorrect. The internal cursor has a valid position after the last item - the after-life sentinel (my (joke) terminiology). The point is that when you are on the last item, it is still valid to call `forth'. This will move the cursor forward (hence it's name), and the cursor has to go somewhere. It goes to the after-sentinel position. Now there is no longer a valid position, so you may no longer call `forth'. _________________________________________________________________ The next generation of Hotmail is here! http://www.newhotmail.co.uk |