Re: [fpc-pascal] Multiple enumerators per class

2023-05-12 Thread Thomas Kurz via fpc-pascal
It's part of generics.collections and located in 
fpc\3.2.2\source\packages\rtl-generics\src\*

- Original Message - 
From: Hairy Pixels via fpc-pascal 
To: FPC-Pascal users discussions 
Sent: Friday, May 12, 2023, 14:59:11
Subject: [fpc-pascal] Multiple enumerators per class



> On May 12, 2023, at 7:24 PM, Marco van de Voort via fpc-pascal 
>  wrote:

> Op 12/05/2023 om 14:16 schreef Hairy Pixels via fpc-pascal:
>> Is it possible to have multiple enumerators on one class?

> Yes, see e.g. TDictionary that allows iterations over keys and values and 
> both. There is only one default iterator, but you can have some property that 
> has its own iterator.

Where is TDictionary located so I can see the class definition? can't seem to 
find it

Regards,
Ryan Joseph

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Multiple enumerators per class

2023-05-12 Thread Hairy Pixels via fpc-pascal



> On May 12, 2023, at 7:24 PM, Marco van de Voort via fpc-pascal 
>  wrote:
> 
> Op 12/05/2023 om 14:16 schreef Hairy Pixels via fpc-pascal:
>> Is it possible to have multiple enumerators on one class?
> 
> Yes, see e.g. TDictionary that allows iterations over keys and values and 
> both. There is only one default iterator, but you can have some property that 
> has its own iterator.

Where is TDictionary located so I can see the class definition? can't seem to 
find it

Regards,
Ryan Joseph

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Multiple enumerators per class

2023-05-12 Thread Marco van de Voort via fpc-pascal



Op 12/05/2023 om 14:16 schreef Hairy Pixels via fpc-pascal:

Is it possible to have multiple enumerators on one class?


Yes, see e.g. TDictionary that allows iterations over keys and values 
and both. There is only one default iterator, but you can have some 
property that has its own iterator.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Multiple enumerators per class

2023-05-12 Thread Hairy Pixels via fpc-pascal
Is it possible to have multiple enumerators on one class?

Regards,
Ryan Joseph

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Multiple enumerators per class

2011-09-16 Thread Paul Ishenin

16.09.2011 5:37, Mattias Gaertner wrote:

Hi all,

I found the Wiki page about the new for-in loop and found a
misinformation. It stated wrongly that it is not possible to
have multiple enumerators per class. It even gave a proposal
for a new feature that did not add anything new.

I added an example how to add a second enumerator to a class:

http://wiki.freepascal.org/for-in_loop#Multiple_enumerators_for_one_class

IMO the proposal was misleading so I deleted it. I hope this is
ok. If not, I will restore it.
The idea was to have multiple enumerators without creating a dummy class 
for each new.


Best regards,
Paul Ishenin.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Multiple enumerators per class

2011-09-15 Thread Mattias Gaertner
Hi all,

I found the Wiki page about the new for-in loop and found a
misinformation. It stated wrongly that it is not possible to
have multiple enumerators per class. It even gave a proposal
for a new feature that did not add anything new.

I added an example how to add a second enumerator to a class:

http://wiki.freepascal.org/for-in_loop#Multiple_enumerators_for_one_class

IMO the proposal was misleading so I deleted it. I hope this is
ok. If not, I will restore it.


Mattias
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Multiple enumerators per class

2011-09-15 Thread Flávio Etrusco
On Thu, Sep 15, 2011 at 6:37 PM, Mattias Gaertner
nc-gaert...@netcologne.de wrote:
 Hi all,

 I found the Wiki page about the new for-in loop and found a
 misinformation. It stated wrongly that it is not possible to
 have multiple enumerators per class. It even gave a proposal
 for a new feature that did not add anything new.

 I added an example how to add a second enumerator to a class:

 http://wiki.freepascal.org/for-in_loop#Multiple_enumerators_for_one_class

 IMO the proposal was misleading so I deleted it. I hope this is
 ok. If not, I will restore it.


 Mattias

How can you use multiple enumerators? I searched it recently and only
found that wiki page ;-)

Best regards,
Flávio
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Multiple enumerators per class

2011-09-15 Thread Mattias Gaertner
On Thu, 15 Sep 2011 18:52:30 -0300
Flávio Etrusco flavio.etru...@gmail.com wrote:

 On Thu, Sep 15, 2011 at 6:37 PM, Mattias Gaertner
 nc-gaert...@netcologne.de wrote:
  Hi all,
 
  I found the Wiki page about the new for-in loop and found a
  misinformation. It stated wrongly that it is not possible to
  have multiple enumerators per class. It even gave a proposal
  for a new feature that did not add anything new.
 
  I added an example how to add a second enumerator to a class:
 
  http://wiki.freepascal.org/for-in_loop#Multiple_enumerators_for_one_class
 
  IMO the proposal was misleading so I deleted it. I hope this is
  ok. If not, I will restore it.
 
 
  Mattias
 
 How can you use multiple enumerators? I searched it recently and only
 found that wiki page ;-)

That's why I added the example. ;)

Mattias
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal