10 REM ************************ 20 REM PROCbubble_sort 30 REM ************************ 40 REM Downloaded from Tim's NC Users' Site 50 REM http://www.ncus.org.uk 60 REM Database of numbers stored in array A%. Total number of integers in K% 70 DEF PROCbubble_sort 80 PRINT"Sorting" 90 REPEAT 100 L%=L%-1 110 FORN%=1 TO L% 120 IF A%(N%)>A%(N%+1) T%=A%(N%):A%(N%)=A%(N%+1):A%(N%+1)=T% 130 NEXT 140 UNTIL L%=1 150 ENDPROC