 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5187
|
Posted: Sat Nov 24, 2007 5:13 am
[2.13] #FORALL and #LOOPDB not sorted |
I have a number of different list and record variables that have the sorted flag on them. When using #FORALL and #LOOPDB they are not run through in the sorted order, instead they run in hash order. There are some slight differences which I also noted, when the Sorted checkbox is set from the Package Editor then both don't run in sorted order. If the #SORT command is used then #FORALL seems to come out in the sorted order. Also I seem to have some trouble keeping the sorted flag on some of my variables, so I think the the PE is not setting the flag correctly.
Procedure
1. Launch CMud
2. Close Sessions window (ESC)
3. Enter at the command line
| Code: |
| #ADDKEY test {a=2|b=3|c=5|d=6|e=8|f=9|g=0|aa=1} |
4. Open the PE and check the sorted box on the test variable
5. Enter at the command line
| Code: |
| #LOOPDB @test {#SHOW %key};#FORALL @test {#SHOW %i} |
You will see 'aa' is listed at the end for each of them. If you replace step 4 with "#SORT test", then the #FORALL comes out sorted. Adding the #SORT command as a step 6 to the above procedure does nothing, even if you uncheck the sorted box in the PE first. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
 |
Tech GURU

Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Mon Nov 26, 2007 1:33 am |
Confirmed.
|
|
_________________ Asati di tempari! |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Nov 26, 2007 5:09 pm |
Added to bug list.
|
|
|
|
 |
|
|
|