<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: As-sertion casting</title>
	<atom:link href="http://tech.turbu-rpg.com/56/as-sertion-casting/feed" rel="self" type="application/rss+xml" />
	<link>http://tech.turbu-rpg.com/56/as-sertion-casting</link>
	<description>My thoughts on Delphi programming in general, and particularly on the technical aspects of developing the TURBU engine and editor.</description>
	<lastBuildDate>Mon, 06 Sep 2010 05:08:43 -0400</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: delphigeist</title>
		<link>http://tech.turbu-rpg.com/56/as-sertion-casting/comment-page-1#comment-45</link>
		<dc:creator>delphigeist</dc:creator>
		<pubDate>Sat, 14 Nov 2009 05:55:34 +0000</pubDate>
		<guid isPermaLink="false">http://tech.turbu-rpg.com/?p=56#comment-45</guid>
		<description>Interesting post, I always use hard cast, but I&#039;m always sure that the variable is of that type, so I just shut up the compiler.
By the way this code
=============================================================
class function TObject.InheritsFrom(AClass: TClass): Boolean; 
{$IFDEF PUREPASCAL} 
var   ClassPtr: TClass; 
begin   
ClassPtr := Self;   
while (ClassPtr  nil) and (ClassPtr  AClass) do     
ClassPtr := PPointer(Integer(ClassPtr) + vmtParent)^;   
Result := ClassPtr = AClass; end;
=============================================================
will not compile, you&#039;ve started a $IFDEF and did not close it with $ENDIF :).</description>
		<content:encoded><![CDATA[<p>Interesting post, I always use hard cast, but I&#8217;m always sure that the variable is of that type, so I just shut up the compiler.<br />
By the way this code<br />
=============================================================<br />
class function TObject.InheritsFrom(AClass: TClass): Boolean;<br />
{$IFDEF PUREPASCAL}<br />
var   ClassPtr: TClass;<br />
begin<br />
ClassPtr := Self;<br />
while (ClassPtr  nil) and (ClassPtr  AClass) do<br />
ClassPtr := PPointer(Integer(ClassPtr) + vmtParent)^;<br />
Result := ClassPtr = AClass; end;<br />
=============================================================<br />
will not compile, you&#8217;ve started a $IFDEF and did not close it with $ENDIF <img src='http://tech.turbu-rpg.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
	</item>
</channel>
</rss>
