<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>Signature</title>
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body bgcolor=white lang=EN-NZ link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Then does <o:p></o:p></span></p>

<p class=MsoNormal>type<br>
&nbsp;&nbsp; Taa = class()<br>
&nbsp;&nbsp; private<br>
&nbsp;&nbsp;&nbsp;&nbsp; class var xx : yy;<o:p></o:p></p>

<p class=MsoNormal>&nbsp;&nbsp; private<br>
&nbsp;&nbsp; &nbsp;&nbsp; zz : integer<br>
&nbsp; public<br>
<br>
<span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Work as expected? I.e zz is an instance variable?<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Myles.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif";color:windowtext'>From:</span></b><span lang=EN-US
style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>
delphi-bounces@delphi.org.nz [mailto:delphi-bounces@delphi.org.nz] <b>On Behalf
Of </b>Rohit Gupta<br>
<b>Sent:</b> Tuesday, 9 October 2007 11:44<br>
<b>To:</b> NZ Borland Developers Group - Delphi List<br>
<b>Subject:</b> [DUG] class variables - bad language definition<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'>Another pitfall for young
players.<br>
<br>
type<br>
&nbsp;&nbsp; Taa = class()<br>
&nbsp;&nbsp; private<br>
&nbsp;&nbsp;&nbsp;&nbsp; class var xx : yy;<br>
&nbsp;&nbsp; &nbsp;&nbsp; zz : integer<br>
&nbsp; public<br>
<br>
<br>
The xx declaration makes all other variables after it class ones as well.&nbsp;
I know its documented, but one doesn't realise the impact until after falling
in the hole.&nbsp; And the hole remains in my code for a future developer to
fall into.&nbsp; This is specially bad after being used to the class function
declaration which works differently.<br>
<br>
I hate this sort of stuff, the code can not become more robust if a declaration
of a new variable affects previous declarations.<o:p></o:p></p>

<div>

<p class=MsoNormal>-- <o:p></o:p></p>

<p class=MsoNormal><strong><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:#666666'>Rohit Gupta</span></strong><o:p></o:p></p>

<p class=MsoNormal><strong><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:#666666'>B.E.&nbsp;Elec.&nbsp;&nbsp;&nbsp;M.E.&nbsp;&nbsp;&nbsp;Mem&nbsp;IEEE&nbsp;&nbsp;&nbsp;
Associate&nbsp;IEE</span></strong><o:p></o:p></p>

<p class=MsoNormal><strong><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:#666666'>Technical&nbsp;Manager</span></strong><o:p></o:p></p>

<p class=MsoNormal><strong><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:#666666'>Computer Fanatics Limited</span></strong><o:p></o:p></p>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

<p class=MsoNormal><strong><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:#666666'>Tel</span></strong><span style='font-size:10.0pt;font-family:
"Verdana","sans-serif";color:#666666'>&nbsp;&nbsp;&nbsp;&nbsp; +64 9 4892280</span><o:p></o:p></p>

<p class=MsoNormal><strong><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:#666666'>Fax</span></strong><span style='font-size:10.0pt;font-family:
"Verdana","sans-serif";color:#666666'>&nbsp;&nbsp;&nbsp; +64 9 4892290</span><o:p></o:p></p>

<p class=MsoNormal><strong><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:#666666'>Email&nbsp; </span></strong><span style='color:#666666'><a
href="mailto:rohit@cfl.co.nz"><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:#0080FF'>rohit@cfl.co.nz</span></a></span><o:p></o:p></p>

<p class=MsoNormal><strong><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:#666666'>Web&nbsp;&nbsp; &nbsp;</span></strong><span style='color:#666666'><a
href="http://www.cfl.co.nz/"><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:#0080FF'>www.cfl.co.nz</span></a></span><o:p></o:p></p>

<div>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

</div>

<div>

<div class=MsoNormal align=center style='text-align:center'>

<hr size=2 width="100%" align=center>

</div>

</div>

<p class=MsoNormal><span style='font-size:7.5pt;font-family:"Verdana","sans-serif";
color:gray'>This email and any attachments contain information, which is
confidential and may be subject to legal privilege and copyright. If you are
not the intended recipient, you must not use, distribute or copy this email or
attachments. If you have received this in error, please notify us immediately
by return email and then delete this email and any attachments.</span><span
style='font-size:10.0pt;font-family:"Courier New"'> </span><o:p></o:p></p>

</div>

</div>


<FONT face=Verdana size=1>Attention:<BR>This communication is confidential 
and may be legally privileged.&nbsp; If you are not the intended recipient, 
please do not use, disclose, copy or distribute it, other than to return it to 
us with your confirmation that it has been deleted from your 
system.<BR></FONT>
</body>

</html>