<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Tony, it should now be much closer to your intent.<BR>
I grant maybe the constants are misplaced, and I should try again to use ToBytes.<BR>
<BR>
<BR>
I'm worried though.<BR>
It used to be I could do:<BR>
<BR>
<BR>
TInt.Add(Int{4,FF,FF,FF,7}, One)<BR>
and be told it overflowed, in 4 bytes of precision.<BR>
<BR>
<BR>
Now it'll just do it in 8 and no overflow.<BR>
<BR>
<BR>
And chop always succeeds.<BR>
<BR>
Maybe:<BR>
<BR>
<BR>
PROCEDURE CheckChop (VAR r: Int; n: CARDINAL) =<BR> BEGIN<BR> IF And (r [n-1], SignMask) = 0<BR> THEN FOR i := n TO LAST(Int) DO IF r [i] # 0 THEN RETURN FALSE END; END;<BR> ELSE FOR i := n TO LAST(Int) DO IF r [i] # Mask THEN RETURN FALSE END; END;<BR> END;<BR>
RETURN TRUE;<BR> END CheckChop;<BR><BR>
?<BR>
<BR> - Jay<BR> </body>
</html>