It's a high score chart
Based upon ASCII value so you will find numbers sort before upper case (capitals) which sort before lower case (little letters).
sync on
sync rate 0
dim text$(100)
dim sorted$(100)
for a=1 to 100
for digits=1 to 5+rnd(5)
text$(a)=text$(a)+chr$(65+rnd(25))
next digits
next a
for a=1 to 100
pos=101
for b=1 to 100
lenA=len(text$(a))
lenB=len(text$(b))
if lenA<lenB then shortest=lenA else shortest=lenB
digit=0
repeat
inc digit
if asc(mid$(text$(a),digit))<asc(mid$(text$(b),digit))
dec pos
tied=0
else
if asc(mid$(text$(a),digit))=asc(mid$(text$(b),digit))
tied=1
endIf
endIf
until tied=0 or digit>shortest
if tied=1
if lenA<lenB
dec pos
else
if lenA=lenB and a<b then dec pos
endIf
endIf
next b
sorted$(pos)=text$(a)
next a
for a=1 to 100
print sorted$(a)
sync
next a
wait key
Pneumatic Dryll
