Thank you, Kai.
Most important: Your program does compile and installs the signal handler.
First: The comparison nil = does not and should not compile since it is not ISO-Pascal! But the error message is not very enlightening!
Error: Wrong number of parameters specified for call to "<Procedure Variable>"
Second: FPSignal returns a previously installed signal handler or nil, if there was no signal handler installed. So expect the return value nil if it is successfull.
Third: The compiler, even in ISO Mode, lets you call FPSignal as a procedure!
Thanks a lot, you really helped me!
Finally: May I ask you to check my (mis)use of Free Pascal in
http://mirrors.ctan.org/systems/unix/tex-fpc/tex-fpc.pdfThis is from January 2019. The edition I am preparing will have all the features of the TeX-GPC program. The last one is the signal handler!
Greetings, Wolfgang
{$MODE ISO}
program interupt(input, output);
var interrupt: integer;
procedure catch; interrupt;
begin
interrupt:=999;
end;
begin
FPSignal(sigint,SignalHandler(CATCH));
if fpGetErrno <> 0 then
writeln('Error:', fPGetErrno);
interrupt := 0;
while interrupt = 0 do ;
writeln(interrupt);
end