Jump to content

Sorting algorithms/Bubble sort: Difference between revisions

(VBScript version)
Line 974:
}
}</lang>
 
=={{header|PL/I}}==
<lang PL/I>
/* A primitive bubble sort */
bubble_sort: procedure (A);
declare A(*) fixed binary;
declare temp fixed binary;
declare i fixed binary, no_more_swaps bit (1) aligned;
 
do until (no_more_swaps);
no_more_swaps = true;
do i = lbound(A,1) to hbound(A,1)-1;
if A(i) > A(i+1) then
do; temp = A(i); A(i) = A(i+1); A(i+1) = temp;
no_more_swaps = false;
end;
end;
end;
end bubble_sort;
</lang>
 
=={{header|Pop11}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.