Hello, Steve!
Steve Batson wrote in a message to All:
SB> Hello All,
SB> The following code works when I compile with Delphi 1.x but not
SB> with Delphi 2. Anyone know why?
first question: how do you increment index variables 'x' and 'Ctr'?
second quiestion: what type are 'CharByte' and 'FBuffer' of?
SB> begin
SB> CharByte:=FBuffer[x];
SB> If (CharByte0) or (CharByte32) then
^^^^???
not ((a0) or (a32)) = (a=0) and (a=32) = false
so your condition is true regardless of 'CharByte' value
SB> begin
SB> CharByte:=CharByte xor Ord(Key[Ctr]);
SB> FBuffer[x]:=CharByte;
SB> end;
SB> If (CharByte=0) or (CharByte=32) then CharByte:=CharByte xor
SB> Ord(Key[Ctr]);
SB> If Ctr>KeyLen then Ctr:=0;
SB> Application.ProcessMessages;
SB> end;
SB>
SB> The routine encrypts the contents of the buffer. Works fine when I
SB> compile 16 bit, 32 bit does not change the buffer. Everything
SB> remains the same. Compiles without errors with either compiler.
SB> Any help would be appreciated.
Please, post the text of whole encoding loop.
With best regards. Alexey Kats.
alexey@kats.pp.kiev.ua
--- GEcho 1.20/Pro
---------------
* Origin: Good luck ... (2:463/201.9)
|