Anonymous user
Sorting algorithms/Insertion sort: Difference between revisions
m
More logical variable names, and PL/I can use lowercase (since about 1964)
m (→{{header|AppleScript}}: Minor modification to take range parameters. Output shown in separate box.) |
m (More logical variable names, and PL/I can use lowercase (since about 1964)) |
||
Line 3,055:
=={{header|PL/I}}==
<lang pli>
insert_sort: proc(array);
dcl
h
do i
tmp =
do j = i - 1 by -1 while(j > l - 1 & array(j) > tmp);
A(J+1)=V;▼
array(j + 1) = array(j);
END;▼
end insert_sort;
</lang>
|