Jump to content

Sorting algorithms/Bubble sort: Difference between revisions

m
m (→‎version 3, random integers, horizontal list, with interim plots: changed wording in the REXX section header.)
Line 3,930:
parse arg N seed . /*obtain optional size of array from CL*/
if N=='' | N=="," then N=30 /*Not specified? Then use the default.*/
if datatype(seed, 'W') then call random ,,seed /*NotAn specifiedinteger? Then useUse the defaultseed for RANDOM.*/
callicall gen N /*generate the array elements (items). */
call show 'before sort:' /*show the before array elements. */
$$= $ /*keep "before" copy for after the sort*/
Cookies help us deliver our services. By using our services, you agree to our use of cookies.