before I post something in the bug forum again and it's not a bug after all, I'll ask here first if I'm too stupid again.
Code: Select all
Global NewList x.s()
AddElement(x()): x()="e"
AddElement(x()): x()="d"
AddElement(x()): x()="c"
AddElement(x()): x()="b"
AddElement(x()): x()="a"
SortList(x(), #PB_Sort_Ascending)
ForEach x()
Debug x()
Next
a
b
c
d
e
Perfect!
However, with the start and end parameters specified, nothing is sorted at all:
Code: Select all
Global NewList x.s()
AddElement(x()): x()="e"
AddElement(x()): x()="d"
AddElement(x()): x()="c"
AddElement(x()): x()="b"
AddElement(x()): x()="a"
SortList(x(), #PB_Sort_Ascending, 3, 5)
ForEach x()
Debug x()
Next
e
d
c
b
a
???
What am I doing wrong now? (PB 5.41)