mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 17:19:33 +02:00
29 lines
348 B
ObjectPascal
29 lines
348 B
ObjectPascal
program taddr3;
|
|
|
|
{$ifndef FPC}
|
|
type
|
|
codepointer = pointer;
|
|
{$endif}
|
|
|
|
procedure testproc;
|
|
begin
|
|
end;
|
|
|
|
function testfunc: codepointer;
|
|
begin
|
|
testfunc:=nil;
|
|
end;
|
|
|
|
var
|
|
p1, p2: codepointer;
|
|
begin
|
|
p1 := @testproc;
|
|
p2 := Addr(testproc);
|
|
if p1<>p2 then
|
|
Halt(1);
|
|
p1 := @testfunc;
|
|
p2 := Addr(testfunc);
|
|
if p1<>p2 then
|
|
Halt(2);
|
|
end.
|