ForAbsoluteIn fact, there were very few opportunities to use it. I only saw it when I read the company's code documentation. At that time, I also asked the experts, but I thought it was the same memory, however, I still feel deeply after reading the instructor's blog today. It seems that it is not just as simple as sharing the same memory.
Here is an example:
ProcedureTform1.formcreate (Sender: tobject );
Var
Num: int64;
PT: tpointAbsoluteNum;
Arr:Array[0... 1]Of
IntegerAbsolutePT;
Begin
PT. x: = 111;
PT. Y: = 222;
Showmessagefmt ('% d, % d', [Arr [0],
Arr [1]); {111,222}
Showmessagefmt ('% d, % d', [NumShl32Shr32,
NumShr32]) ;{111,
222}
End;
For the three values, the relationship between num, pt, and arr through absolute all points to a fast memory area. After a volume changes, other values also change.
In addition, this is the first time you can see it. Maybe I still don't know much about it. Let's share it with you:
Var
Str: string [32];
StrLen: Byte absolute Str;
The purpose of using absolute here is that when you need to take the actual length of the Str variable in the future, you don't need to call the function, just take the StrLen variable directly.