File:  [CSRG BSD Unix] / 43BSDReno / pgrm / pascal / tstpx / src / sort.p
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:57 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43reno
BSD 4.3reno

program bench1(output);
    const size = 300;
    var i,j,t: integer; a: array[1..size] of integer;
begin for i := 1 to size do a[i] := size + 1 - i;
    for i := size-1 downto 1 do
	for j := i to size-1 do
	    if a[j] > a[j+1] then
		begin t := a[j]; a[j] := a[j+1]; a[j+1] := t end;
    { for i := 1 to size do writeln(a[i]) }
end.

unix.superglobalmegacorp.com

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