All pastes #391530 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-03-12 06:13 UTC
rendered paste body
	sub bubbleSort(byref arr)
		dim count, i, j, bound, temp
		
		bound = uBound(arr)
		i = bound
		
		for count = 0 to bound
			j = 1
			do while j <= i
				if arr(j - 1) > arr(j) then
					temp = arr(j - 1)
					
					arr(j - 1) = arr(j)
					arr(j) = temp
				end if
				j = j + 1
			loop
			i = i - 1
		next
	end sub