blob: 2f49f8baacd0c2169e5ee3712e26d2b13e72bab7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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.
|