function crcvalue (stringtoeval : string): integer;
var
count: byte;
tempcrc: word;
begin
tempcrc:=$FFFF;
for count:=1 to length (stringtoeval) do
begin
tempcrc:=swap(tempcrc) xor ord (stringtoeval [count]);
tempcrc:=tempcrc xor (lo (tempcrc) shr 4);
tempcrc:=tempcrc xor (swap (lo (tempcrc)) shl 4) xor (lo (tempcrc) shl 5)
end;
crcvalue:=tempcrc xor $FFFF
end; [of function crcvalue]


![Applauso [applauso]](http://www.megalab.it/forum/images/smilies/clapping.gif)


![Mi metto a piangere... [cry]](http://www.megalab.it/forum/images/smilies/crying.gif)
![Piangere a dirotto [cry+]](http://www.megalab.it/forum/images/smilies/cry.gif)
![Approvazione [^]](http://www.megalab.it/forum/images/smilies/Oh-yea.gif)