Grog, you're a genius, thanks
As for why I need this . . . I'm putting together a little turn based RPG and I want to have the order in which characters and enemies take part in combat based on their initiative (which is represented by a number).
I couldn't get my head around a way of doing this, but thanks to your help I've now got it sussed. The code below shows exactly what I've done . . . the PRINT commands will be links to sub-routines to deal with the combat in my program, but this gives you an idea of what I've done with your code.
Thanks again for the help and once again this forum has proved itself to be invaluable
CharacterQty = 2
EnemyQty = 2
DIM Characters$(2,2)
Characters$(1,1) = "3"
Characters$(1,2) = "Print This Last"
Characters$(2,1) = "15"
Characters$(2,2) = "Print This First"
DIM Enemies$(2,2)
Enemies$(1,1) = "6"
Enemies$(1,2) = "Print This Third"
Enemies$(2,1) = "9"
Enemies$(2,2) = "Print This Second"
DIM CombatOrder$((CharacterQty + EnemyQty),2)
FOR c = 1 TO (CharacterQty + EnemyQty)
IF c =< CharacterQty
FOR d = 1 TO 2
CombatOrder$(c,d) = Characters$(c,d)
NEXT d
ENDIF
IF c > CharacterQty
FOR d = 1 TO 2
CombatOrder$(c,d) = Enemies$((c - CharacterQty),d)
NEXT d
ENDIF
NEXT c
PRINT "CombatOrder$ array contents as stored"
PRINT
FOR c = 1 to 4
FOR d = 1 to 2
PRINT CombatOrder$(c,d), " ",
NEXT d
PRINT
NEXT c
PRINT
PRINT
PRINT "CombatOrder$ array contents sorted . . . thanks Grog :o)"
PRINT
for b=20 to 1 step -1
for t=1 to (CharacterQty + EnemyQty)
for u = 1 to 2
if val(CombatOrder$(t,1))= b then print CombatOrder$(t,u), " ",
next u
if val(CombatOrder$(t,1))= b then print
next t
next b
suspend for key