mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 21:52:57 +02:00
* Another strange delphi procvar thingy, this time with assigned()
This commit is contained in:
parent
f75fd47e00
commit
d393a6f1cb
19
tests/tbs/tb0430.pp
Normal file
19
tests/tbs/tb0430.pp
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{$ifdef fpc}{$mode delphi}{$endif}
|
||||||
|
|
||||||
|
function f1:pointer;
|
||||||
|
begin
|
||||||
|
result:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
func: function:pointer;
|
||||||
|
begin
|
||||||
|
func:=f1;
|
||||||
|
{ Assigned() works on the procvar and does not
|
||||||
|
call func }
|
||||||
|
if not assigned(func) then
|
||||||
|
begin
|
||||||
|
writeln('ERROR!');
|
||||||
|
halt(1);
|
||||||
|
end;
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user