在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確實接受指針,但當然意義發生了變化。所以我會說你總是避免投射整數,但要小心。 –