Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2021-10

TEnumerator - After the last element?

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Gabor Boros

Hi All,

I need to know the current position is after the last element. The attached solution demonstrate what I want.

Is an internal solution exists for this task? I not found anything.

Gabor

Sven Barth
to Gabor Boros
Gabor Boros wrote 6 lines
Hi All, I need to know the current position is after the last element. The attached solution demonstrate what I want. Is an internal solution exists for this task? I not found anything.

MoveNext returns False once the enumerator has reached its end (that's how for-in is implemented after all).

Regards,
Sven