&myArray() as Numeric unsorted &iCount as Numeric is the Upper Bound of the array &Tmp as Numeric same myArray (but not is an array) &i as Numeric same &iCount &j as Numeric same &iCount for &i = &iCount - 1 to 1 step -1 for &j = 1 to &i if &myArray(j) > &myArray(j 1) &Tmp = &myArray(j) &myArray(j) = &myArray(j 1) &myArray(j 1) = &Tmp endif endfor endfor