mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-05 05:27:19 +01:00
+ Initial implementation
This commit is contained in:
parent
0fb3ed4ad3
commit
0eb61aa2b1
21
docs/refex/ex98.pp
Normal file
21
docs/refex/ex98.pp
Normal file
@ -0,0 +1,21 @@
|
||||
Program Example98;
|
||||
|
||||
{ Program to demonstrate the exitproc function. }
|
||||
|
||||
Var
|
||||
OldExitProc : Pointer;
|
||||
|
||||
Procedure MyExit;
|
||||
|
||||
begin
|
||||
Writeln('My Exitproc was called. Exitcode = ',ExitCode);
|
||||
{ restore old exit procedure }
|
||||
ExitProc:=OldExitProc;
|
||||
end;
|
||||
|
||||
begin
|
||||
OldExitProc:=ExitProc;
|
||||
ExitProc:=@MyExit;
|
||||
If ParamCount>0 Then
|
||||
Halt(66);
|
||||
end.
|
||||
Loading…
Reference in New Issue
Block a user