a fast way to order a type ASC (number)

Blitz3D Forums/Blitz3D Programming/a fast way to order a type ASC (number)

Now I'm testing and its working fast :)
My second [other question] is now:

Can I do this
Afunction(a type field)

for example the code to order a type dynamic by yust selecting a field.

I know that I can't do Afunction(obj\Index%) because i get the value then.
I tryed something with the undocumented Object. but that's wasn't working either.

Is this possible or must I make 2 function ?

Thanks
GC-Martijn

[code]
Type Item
Field Index%
Field otherField%
End Type

InsertionSort(Index%) ;Index%||otherField%
ShowData()

Function InsertionSort(what)
Local Item.Item, NextItem.Item
Local p.Item, q.Item
Local temp%

NextItem=After First Item
While NextItem<>Null
Item=NextItem
NextItem=After Item
p=Item : temp=Item\Index
Repeat ;--^------ dynamic (what)
q=Before p
If q=Null Then Exit
If temp >= q\Index Then Exit
p=q ;--^------ dynamic (what)
Forever
q=Item
Insert q Before p
Wend

End Function
[/cod]