Sorting algorithms/Insertion sort: Difference between revisions

→‎{{header|TI-83 BASIC}}: ??? duplicated below
(→‎{{header|TI-83 BASIC}}: ??? duplicated below)
Line 3,257:
}
}</lang>
 
=={{header|TI-83 BASIC}}==
Store input in L<sub>1</sub>, run prgmSORTINS, get output in L<sub>2</sub>.
:L<sub>1</sub>→L<sub>2</sub>
:0→A
:Lbl L
:A+1→A
:A→B
:While B>0
:If L<sub>2</sub>(B)<L<sub>2</sub>(B+1)
:Goto B
:L<sub>2</sub>(B)→C
:L<sub>2</sub>(B+1)→L<sub>2</sub>(B)
:C→L<sub>2</sub>(B+1)
:B-1→B
:End
:Lbl B
:If A<(dim(L<sub>2</sub>)-1)
:Goto L
:DelVar A
:DelVar B
:DelVar C
:Stop
 
=={{header|Tcl}}==
1,336

edits