Sorting algorithms/Bubble sort: Difference between revisions

Content added Content deleted
Line 3,931: Line 3,931:
if N=='' | N=="," then N=30 /*Not specified? Then use the default.*/
if N=='' | N=="," then N=30 /*Not specified? Then use the default.*/
if datatype(seed, 'W') then call random ,,seed /*An integer? Use the seed for RANDOM.*/
if datatype(seed, 'W') then call random ,,seed /*An integer? Use the seed for RANDOM.*/
icall gen N /*generate the array elements (items). */
call gen N /*generate the array elements (items). */
call show 'before sort:' /*show the before array elements. */
call show 'before sort:' /*show the before array elements. */
$$= $ /*keep "before" copy for after the sort*/
$$= $ /*keep "before" copy for after the sort*/