Posts

Showing posts with the label typedefinitions

I am trying to step up my Delphi knowledge so I recently purchased the complete Blaise Pascal Magazine library. I was reading an article from BPM #3 by Primož Gabrijelčič called "Introduction to Enumerators". (See attached image)

Image
I am trying to step up my Delphi knowledge so I recently purchased the complete Blaise Pascal Magazine library. I was reading an article from BPM #3 by Primož Gabrijelčič called "Introduction to Enumerators".  (See attached image) I'm slightly confused by the following type definitions he used with regard to the TFonList class. It is declared first as an empty class and then declared a second time with private and public members. Why is this done this way? My guess would be the private field FList in the TFontListEnumerator class needs it to be defined before it can be used. The deeper question is how and where do you learn these class writing techniques? They seem so fundamental to writing great code. Thanks in advance. #classes #typedefinitions