<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body smarttemplateinserted="true">
<div id="smartTemplate4-template">Hi,<br>
<br>
<p>
<blockquote type="cite"><br>
I haven't used type helpers but why not change to defines like<br>
<br>
type<br>
jObjectRec = record end;<br>
jObject= ^jObjectRec;<br>
jClassRec = record end;<br>
jClass = ^jClassRec;<br>
<br>
or possibly simpler you could try<br>
jclass = type(jobject); // I believe this forces a new type
and is not just an alias</blockquote>
</p>
<br>
that looks better. <br>
<br>
Who can change them? These jobject/jclass type definitions are
part of fpc...<br>
<br>
<br>
<br>
<br>
<br>
Although type is weird<br>
<br>
<blockquote type="cite">type a = type (pointer);<br>
type b = type (a);<br>
</blockquote>
<br>
does not compile, duplicate identifier a<br>
<br>
<blockquote type="cite">type a = type (pointer);<br>
type b = type a;<br>
</blockquote>
<br>
compiles, but a type helper for cannot use self as pointer. self
<> nil => operator is not overloaded. But you can do
writeln(self);<br>
<br>
<blockquote type="cite">type a = type pointer;<br>
type b = type (a);<br>
</blockquote>
<br>
does not compile, duplicate identifier a<br>
<br>
<blockquote type="cite">type a = type pointer;<br>
type b = type a;<br>
</blockquote>
<br>
compiles, and is like a pointer, but unlike case 2, you cannot do
writeln(self) in the type helper<br>
<br>
<br>
<blockquote type="cite">type a = type (pointer);<br>
type b = type (pointer);<br>
</blockquote>
<br>
does not compile, duplicate identifier<br>
<br>
<blockquote type="cite">type a = type (pointer);<br>
type b = type pointer;<br>
</blockquote>
<br>
does not compile, error in type definition<br>
<br>
<blockquote type="cite">type a = type pointer;<br>
type b = type (pointer);<br>
</blockquote>
<br>
compiles<br>
<br>
<blockquote type="cite">type a = type pointer;<br>
type b = type pointer;<br>
</blockquote>
<br>
compiles<br>
<br>
<br>
<br>
<br>
Cheers,<br>
Benito </div>
<br>
<br>
<br>
<div class="moz-cite-prefix">Am 23.08.2018 um 04:23 schrieb Andrew
Haines via fpc-pascal:<br>
</div>
<blockquote type="cite"
cite="mid:380094b1-f5ac-54ed-9b14-570d51f6db2e@aol.com">
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On 08/12/2018 07:42 AM, Benito van
der Zander wrote:<br>
</div>
<blockquote type="cite"
cite="mid:7056c380-0e3e-0104-888d-8e3c55fc1e1d@benibela.de">
<div id="smartTemplate4-template"><br>
<br>
But this does not work, because fpc thinks jclass and jobject
are the same type, so there is only one type helper for both
of the types allowed.<br>
<br>
Because it is declared as<br>
<br>
type<br>
jobject=pointer;<br>
jclass=jobject;<br>
<br>
<br>
What can we do about this?<br>
<br>
</div>
</blockquote>
I haven't used type helpers but why not change to defines like<br>
<br>
type<br>
jObjectRec = record end;<br>
jObject= ^jObjectRec;<br>
jClassRec = record end;<br>
jClass = ^jClassRec;<br>
<br>
or possibly simpler you could try<br>
jclass = type(jobject); // I believe this forces a new type and
is not just an alias<br>
<br>
Regards,<br>
<br>
Andrew<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
fpc-pascal maillist - <a class="moz-txt-link-abbreviated" href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a></pre>
</blockquote>
<br>
</body>
</html>