I made a couple bubble sorts 5 years ago but I can't remember exactly how its done. Here is a very crude version, a bubble sort I think works faster by switching numbers in a way that shortens the list more effectively as you go.. This is all you need for four numbers...
TYPE R
NUM as INTEGER
END TYPE
DIM SEQ(1 to 4) AS R
offset=1
Input four numbers:
FOR I = 1 to 4
INPUT "Number?",seq(i).num
NEXT i
FOR Y = 1 to 4
FOR I = offset to 4
if x > seq(i).num then x=seq(i).num 'this will put the
f=i 'lowest number in x and store its index position in f
ENDIF 'if the number you read is greater than the last lowest number then it just goes on to the next
NEXT i
'now you have the first lowest number so put it at
the top of the list
temp = seq(offset).num 'store current top number in temp variable
'switch your low number with this
seq(offset).num = x
seq(f).num =temp ' this puts the number that was at the top where your low number was found
'I think bubble sorts make the best guess as to where to put this number, this just switches them
offset = offset + 1 ' add one to the offset so you don't look at numbers you've already sorted
x=0
NEXT Y ' does this 4 times