use of generic types and specialize lazarus / 21-General ---------------------------------------------------------------------- SA.Blackmon · 2021-01-12 00:12 I am working on learning more about Lazarus and so far am doing reasonably well (my own estimate.) The idea of generic types in "https://freepascal.org/docs- html/ref/refse52,3,4.html" is something I believe I can incorporate profitably into my code. That is, when I get it to work. I have some code where I copied from the above url's and it mostly does not compile. Please see the zip attachment for the project with embedded comments that specify the compiler errors. I suspicion that  it has to do with compiler directives. ---------------------------------------------------------------------- jamie · 2021-01-12 00:24 Nice, Website not found. The Electrons over the horizon must be getting reflected! ---------------------------------------------------------------------- trev · 2021-01-12 02:55 It's a composite URL Start at https://freepascal.org/docs-html/ref/refse52.html ---------------------------------------------------------------------- PascalDragon · 2021-01-12 08:02 Quote from: SA.Blackmon on January 12, 2021, 01:12:52 amI have some code where I copied from the above url's and it mostly does not compile. Please see the zip attachment for the project with embedded comments that specify the compiler errors. I suspicion that  it has to do with compiler directives. You need to declare your TList<> and TObjectList<> before they are used (thus before line 29). Or alternatively use those from the unit Generics.Collections (of course if you only implemented them to learn, please continue ). Generic functions/procedures/methods (aka “routines”) is mostly useful if you have some simple utility functions that you want to be typesafe. Or you want to avoid to write X overloads that are all essentially doing the same for different types. In line 115 (your call to compare) you pass a number to a function that takes either a TComponent or a TDiffRecord descendant. You need to use two different elements of your list to compare them, not an element and a number.