On Thu, Jan 9, 2014 at 9:55 AM, Sven Barth <[email protected]>wrote:
> Am 08.01.2014 22:01, schrieb Michael Van Canneyt: > > You can preview the result at >> >> http://www.freepascal.org/~michael/ref/refch3.html >> > You might additionally mention that these type aliases also allow > different operator and (AFAIK also) function overloads. > Also, that they have different RTTI records, that is the TypeInfo() compiler function returns different pointers for the original and derived type, while for simple type aliases (no "type" after "=") it returns the same pointer. In Delphi and I suppose in Lazarus this is often used in order to register a specific property editor for each property of an otherwise common type that has special semantics, e.g. type TFileName = type string; -- Constantine
_______________________________________________ fpc-pascal maillist - [email protected] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
