mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 11:08:02 +02:00
20 lines
268 B
ObjectPascal
20 lines
268 B
ObjectPascal
type
|
|
TRecord = record
|
|
P1,
|
|
P2: pointer;
|
|
end;
|
|
|
|
var
|
|
var1: longint;
|
|
varabs: longint absolute 1234;
|
|
const
|
|
info: TRecord = (P1: @var1; // Works
|
|
P2: @varabs); // Won't work
|
|
|
|
begin
|
|
if ptrint(info.p2)<>1234 then
|
|
halt(1);
|
|
writeln('ok');
|
|
end.
|
|
|