<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 7, 2019 at 3:44 PM Sven Barth via fpc-devel <<a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF"><blockquote type="cite"><div dir="ltr"><div class="gmail_quote">
</div>
</div>
</blockquote>
No, I think you *missed* the point. "^Type" defines a new type.
"0..5" defines a new type. "set of (Alpha, Beta, Gamma)" defines a
new type. "record a, b: longint end" defines a new types. All four
of these can be used either to declare a named type or for an
anonymous type in a variable declaration. However none of these can
be used in a parameter declaration. Parameter declarations and
variable declarations are different beasts, they have different
rules (for example you can't declare open arrays outside of
parameter declarations and no, dynamic arrays don't count, cause
despite them sharing a syntax dynamic arrays and open arrays are
different concepts)<br></div></blockquote><div><br></div><div>You're just describing what is *currently* valid and not-valid syntax, which we all already know. No one has explained *why* exactly "^Type" would be somehow a negative thing in the context of method signatures, while at the same time being perfectly fine for things like both global and local variables, as well as constants. The following works, for example:</div><div><br></div><div>const X: LongInt = 12;</div><div>const Y: ^LongInt = @X;</div><div><br></div><div>I get what you mean about the range, set, and record declarations, however, I don't think it's the same issue in a practical sense. All of those *really* declare types that are *actually* new in a completely arbitrary way. "^Type" declares a new type in the sense of "it has its own RTTI name", but it's still ultimately just an alias that can never mean anything other than "a pointer to a specific type that already exists."</div><div><br></div><div>As far as your example, I'm well aware of that kind of thing, but it's a workaround, not a solution. </div></div></div>