<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jan 9, 2014 at 9:55 AM, Sven Barth <span dir="ltr"><<a href="mailto:pascaldragon@googlemail.com" target="_blank">pascaldragon@googlemail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Am 08.01.2014 22:01, schrieb Michael Van Canneyt:<div><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
You can preview the result at<br>
<br>
<a href="http://www.freepascal.org/~michael/ref/refch3.html" target="_blank">http://www.freepascal.org/~<u></u>michael/ref/refch3.html</a><br>
</blockquote></div>
You might additionally mention that these type aliases also allow different operator and (AFAIK also) function overloads.<br></blockquote></div><br><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">
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.<br>
</div><br><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">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.<br>
<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">type<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"> TFileName = type string;<br></div><br>--<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">
Constantine</div><br></div></div>