在XE2中的64位平台上,这将如何正确?64位XE2中的Integer()
type
PRGB24 = ^TRGB24;
TRGB24 = packed record
B: Byte;
G: Byte;
R: Byte;
end;
var
s1: pRGB24;
ptrD: integer;
....
inc(Integer(s1), PtrD); <- gives error here "Left side cannot be assigned to"
工作,谢谢! – hikari
inc确实接受指针,但当然意义发生了变化。所以我会说你总是避免投射整数,但要小心。 –