[PASCAL] - [VB] Code translation
Inviato: mar ott 25, 2005 5:10 pm
Ho un pezzo di codice in pascal che dovrei tradurre in VB, qualcuno può aiutarmi? Per me è arabo
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]
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]