fpc/tests/test/tblock1.pp
Jonas Maebe 5d4837329b * changed {$modeswitch blocks} to {$modeswitch cblocks} to avoid confusion
with the Pascal meaning of the term "block"

git-svn-id: trunk@29594 -
2015-02-01 15:50:06 +00:00

33 lines
376 B
ObjectPascal

{ %target=darwin,iphonesim}
{ %skipcpu=powerpc,powerpc64 }
{$modeswitch cblocks}
type
tblock = reference to procedure; cdecl;
procedure test(b: tblock);
begin
b;
end;
procedure proc;
begin
writeln('called as block');
end;
const
bconst: tblock = @proc;
var
b: tblock;
begin
b:=@proc;
b;
test(@proc);
test(b);
bconst;
test(bconst);
end.