On Mon, Nov 9, 2015 at 7:47 AM, Graeme Geldenhuys
wrote:
> Not to be a stickler, but that is not an ideal interface either (in my
> eyes). Not everything is a "file", so EOF (End-of-File) was really not a
> good choice. eg: Iterating characters in a String, Objects in a
> ObjectList etc... none re
On 2015-11-08 18:38, leledumbo wrote:
> It := SomeContainer.Iterator;
> while not It.EOF do begin
> ...
> It.Next;
> end;
Not to be a stickler, but that is not an ideal interface either (in my
eyes). Not everything is a "file", so EOF (End-of-File) was really not a
good choice. eg: Iterating c
> I'd say don't change. In my opinion the need to restructure one's code
outweighs that disadvantage. If anything then add a for-in compatible
iterator like was done for TVector<>.
Didn't realize that the support is already there, I'll just change to for-in
loop then. Silly me :S
--
View thi
Am 08.11.2015 22:36 schrieb "Michael Van Canneyt" :
>
>
>
> On Sun, 8 Nov 2015, Sven Barth wrote:
>
>> On 08.11.2015 19:38, leledumbo wrote:
>>>
>>> FCL-STL from the start has different iterator usage pattern compared to
>>> existing containers (say a TSQLQuery). i.e. the common pattern is:
>>>
>>>
On Sun, 8 Nov 2015, Sven Barth wrote:
On 08.11.2015 19:38, leledumbo wrote:
FCL-STL from the start has different iterator usage pattern compared to
existing containers (say a TSQLQuery). i.e. the common pattern is:
It := SomeContainer.Iterator;
while not It.EOF do begin
...
It.Next;
en
On 08.11.2015 19:38, leledumbo wrote:
FCL-STL from the start has different iterator usage pattern compared to
existing containers (say a TSQLQuery). i.e. the common pattern is:
It := SomeContainer.Iterator;
while not It.EOF do begin
...
It.Next;
end;
instead, it uses:
It := SomeContainer
FCL-STL from the start has different iterator usage pattern compared to
existing containers (say a TSQLQuery). i.e. the common pattern is:
It := SomeContainer.Iterator;
while not It.EOF do begin
...
It.Next;
end;
instead, it uses:
It := SomeContainer.Iterator;
repeat
...
until not It.Next;