summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/test/tmacnonlocalexit.pp
blob: c77b4038de711ee3170c1c596150ce8318021925 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
program tmacnonlocalexit;
{$MODE MACPAS}

	var
		failed: Boolean;

	procedure Global;

		procedure Local;
		begin
			Exit(Global);
			failed := true;
		end;

	begin
		Local;
		failed := true;
	end;


begin
	failed := false;

	Global;

	if failed then
		writeln('Failed')
	else
		writeln('Succeded');

  {$IFC NOT UNDEFINED FPC}
	if failed then
		Halt(1);
  {$ENDC}
end.