About
Pricing
Community
Teams
Start Free Trial
Log in
Labib Nassim
asked on
3/26/2017
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.
Delphi
* xe8
2
1
Last Comment
Labib Nassim
8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Sinisa Vuk
3/26/2017
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Labib Nassim
3/26/2017
ASKER
Thank you. So obvious in retrospect. :)
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy