<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>here is a simple function I use:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><B><FONT size=2>
<P>function</B> CalcCheckSum(<B>const</B> S: <B>String</B>): 
Word;<BR><B>var</B><BR>&nbsp; i: Integer;<BR><B>begin</B><BR>&nbsp; result := 
0;<BR><B>&nbsp; for</B> i := 1 <B>to</B> Length(S) 
<B>do</B><BR>&nbsp;&nbsp;&nbsp; result := result <B>xor</B> 
Word(S[i]);<BR><B>end</B><BR></P>
<P><FONT face=Arial>probably not the fastest, but it's adequate.</FONT></P>
<P><FONT face=Arial>Cheers,</FONT></P>
<P><FONT face=Arial>Phil.</FONT></P></FONT></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=vss@vss.co.nz href="mailto:vss@vss.co.nz">Jeremy Coulter</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=delphi@delphi.org.nz 
  href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, November 11, 2004 4:12 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [DUG] ’exclusive or’</DIV>
  <DIV><BR></DIV>
  <DIV 
  style="FONT-SIZE: 10pt; FONT-FAMILY: tahoma; BACKGROUND-COLOR: white"><FONT 
  face=Arial size=2>
  <P align=left>Hi all.</P></DIV>
  <P align=left>I am not too good a this stuff, but I have to pass a checksum at 
  the end of a bit of data, and the documentation says "the checksum Is 
  calculated by ’exclusive or’ among all sent characters"
  <DIV></DIV>
  <P align=left>How would I do this?
  <DIV></DIV>
  <P align=left>&nbsp;
  <DIV></DIV>
  <P align=left>Jeremy
  <DIV></DIV></FONT>
  <DIV></DIV>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>Delphi mailing 
  list<BR><A 
  href="mailto:Delphi@ns3.123.co.nz">Delphi@ns3.123.co.nz</A><BR>http://ns3.123.co.nz/mailman/listinfo/delphi<BR></BLOCKQUOTE></BODY></HTML>