File:  [CSRG BSD Unix] / 43BSDTahoe / ucb / pascal / pdx / test / case.p
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:58 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43tahoe
BSD 4.3tahoe

program casetest(input, output);
var c : char;
	s : 0..1000;
	i : integer;
begin
	c := 'a';
	case c of
		'b': writeln('b');
		'c': writeln('c');
		'a': writeln('a');
	end;
	s := 3;
	case s of
		5: writeln('5');
		3: writeln('3');
		7: writeln('7');
	end;
	i := 1001;
	case i of
		0: writeln('0');
		-1: writeln('-1');
		1001: writeln('1001');
		-1001: writeln('-1001');
	end;
end.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.