Labib Nassim
asked on
Typecasting TBytes to Integer in Delphi XE8
In Delphi 7, I used to be able to do following:
Type
TA4: array[1..4] of char;
var
a4: TA4;
n1: Integer;
a4[1] := #1;
a4[2] := #2;
a4[3] := #1;
a4[4] := #2;
n1 := Integer(a4);
Now - with XE8 - it no longer works and it produces a message "E2089 Invalid Typecast"
Is there another way of doing it? The data is now coming from Bytes1: TBytes
Thank you.
Type
TA4: array[1..4] of char;
var
a4: TA4;
n1: Integer;
a4[1] := #1;
a4[2] := #2;
a4[3] := #1;
a4[4] := #2;
n1 := Integer(a4);
Now - with XE8 - it no longer works and it produces a message "E2089 Invalid Typecast"
Is there another way of doing it? The data is now coming from Bytes1: TBytes
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER