Re: [fpc-pascal] Multiple enumerators per class
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
> 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
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
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] Record Constructors which differ in parameter lists
On Fri, 12 May 2023, Thomas Kurz via fpc-pascal wrote: I would expect the type helper to remain functional. The types are the same for all purposes except they have a different RTTI entry. But this behaviour seems inconsistent to me. For example: With "var x:double" I can use "x.IsNan". With TDateTime, which is defined as "type TDateTime = type Double", I cannot. With strings, I can use "x.IsEmpty". With Utf8String, which is defined as "type TUtf8String = type AnsiString", I cannot. It's not because I expect it to, that it is actually so. As I said, Sven will need to explain what the current behaviour actually is... Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Record Constructors which differ in parameter lists
> I would expect the type helper to remain functional. The types are the same > for all purposes except they have a different RTTI entry. But this behaviour seems inconsistent to me. For example: With "var x:double" I can use "x.IsNan". With TDateTime, which is defined as "type TDateTime = type Double", I cannot. With strings, I can use "x.IsEmpty". With Utf8String, which is defined as "type TUtf8String = type AnsiString", I cannot. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal