xref: /csrg-svn/usr.bin/pascal/pdx/test/goto.p (revision 48080)
1*48080Sbostic(*
2*48080Sbostic * Copyright (c) 1980 The Regents of the University of California.
3*48080Sbostic * All rights reserved.
4*48080Sbostic *
5*48080Sbostic * %sccs.include.redist.c%
6*48080Sbostic *
7*48080Sbostic *	@(#)goto.p	5.1 (Berkeley) 04/16/91
8*48080Sbostic *)
9*48080Sbostic
10*48080Sbostic
11*48080Sbosticprogram gototest(input, output);
12*48080Sbosticlabel 1;
13*48080Sbostic
14*48080Sbosticprocedure A;
15*48080Sbosticbegin
16*48080Sbostic	writeln('A');
17*48080Sbostic	goto 1;
18*48080Sbosticend;
19*48080Sbostic
20*48080Sbosticprocedure B;
21*48080Sbosticbegin
22*48080Sbostic	writeln('B');
23*48080Sbostic	A;
24*48080Sbosticend;
25*48080Sbostic
26*48080Sbosticbegin
27*48080Sbostic	B;
28*48080Sbostic1:
29*48080Sbostic	writeln('exiting');
30*48080Sbosticend.
31