<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
I always wondered why I get a compiler message for the following
code snipped:<br>
<div class="moz-forward-container"><br>
----------------------------------------------------------------------------<span
lang="EN-US"><br>
function Match(M,F : UTF8String) : boolean;<o:p></o:p></span>
<div class="WordSection1"><span lang="EN-US">var i : Cardinal;<o:p></o:p></span>
<p class="MsoNormal"><span lang="EN-US">...<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">if
i+length(M)<length(F) then<br>
...<br>
</span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>----------------------------------------------------------------------------<span
lang="EN-US"><br>
</span><br>
</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">For the last code line I
get:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">unit1.pas(1097,14) Hint:
Mixing signed expressions and longwords gives a 64bit result<br>
</span></p>
<p class="MsoNormal">But where are signed expressions involved?<br>
i is Cardinal (so it cannot be negative) and <br>
the two length-statements can also never be negative.<br>
There is no substraction so why this message?<br>
Anybody knows?<br>
<span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</div>
</body>
</html>