<div dir="auto"><div><div class="gmail_extra"><div class="gmail_quote">Am 25.10.2017 13:06 schrieb "Giuliano Colla via Lazarus" <<a href="mailto:lazarus@lists.lazarus-ide.org">lazarus@lists.lazarus-ide.org</a>>:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="quoted-text">With older Delphi's up to, I believe, Delphi 7 you have that:<br></div>
<br>
1) the syntax for the assignment of a procedural type is @ProcIdentifier := whatever;<br>
<br>
2) If whatever is a pointer, and ProcIdentifier is a Method, the data field is left untouched<br>
<br>
This made it possible, with some dirty tricks to build a proper method procedural type.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">You're relying on implementation details which now often than not is an accident waiting to happen. </div><div dir="auto">If you want to play around with the data pointer of a method pointer then cast it to TMethod which a record with a code and data pointer and is the documented way for this. </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
In recent Delphi's (someone tested with X7, I did with X10)<br>
<br>
1) The syntax @ProcIdentifier := whatever is no more valid. It's no more possible to assign a pointer to a method type without typecasting.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Probably for good reason. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven</div></div>