On Fri, 10 Jan 2014, Constantine Yannakopoulos wrote:

On Thu, Jan 9, 2014 at 9:55 AM, Sven Barth <pascaldra...@googlemail.com> 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;

I already mention all this.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to