Sorting algorithms/Insertion sort: Difference between revisions
m
→{{header|PL/I}}: A little more in the PL/I spirit
m (→{{header|jq}}) |
PatGarrett (talk | contribs) m (→{{header|PL/I}}: A little more in the PL/I spirit) |
||
Line 1,953:
=={{header|PL/I}}==
<lang pli>
INSSORT:
DCL
DCL (I, J, V, N, M) FIXED BIN(31);
N = HBOUND(A,1); M = LBOUND(A,1);
DO I=M+1 TO N;
V=A(I);
DO J=I-1 BY -1 WHILE (J > M-1);
END;
A(J+1)=V;
|