AryanGupta
(Aryan Gupta)
#1
ListUtils is not working .
here is my blocks
do it result
You could try this extension:
Btw, seems that your list is already sorted
AryanGupta
(Aryan Gupta)
#3
i already try this extension. Same Result.
AryanGupta
(Aryan Gupta)
#4
can we do it with for loop
Seems that your list is already sorted 1-10-100-102-103,etc…I guess that is the right ascending order .
AryanGupta
(Aryan Gupta)
#6
sorry , i have value from 1 to 120.
Maybe you can show your whole list ? Do you have negitave values in your list.
1 Like
AryanGupta
(Aryan Gupta)
#8
it showing 1-10 where is 2,3,4,5,6…
AryanGupta
(Aryan Gupta)
#9
Do It Result: ((1 10 100 101 102 103 104 105 106 107 108 109 11 110 111 112 113 114 115 116 117 118 119 12 120 13 14 15 16 17 18 19 2 20 21 22 23 24 25 26 27 28 29 3 30 31 32 33 34 35 36 37 38 39 4 40 41 42 43 44 45 46 47 48 49 5 50 51 52 53 54 55 56 57 58 59 6 60 61 62 63 64 65 66 67 68 69 7 70 71 72 73 74 75 76 77 78 79 8 80 81 82 83 84 85 86 87 88 89 9 90 91 92 93 94 95 96 97 98 99))
—
Rogerio_Rios
(Professional Support)
#10
They are in non-numerical order.
All starting with 1 first …
All starting with 2 …
All starting with 3…
The solution was what @Mohamed_Tamer suggested.
3 Likes
Yes,It seems that ListUtils extension doesn’t sort vales in numerical order ( just in alphabetical order ) :
However:
4 Likes
Try to make your list like this :
001, 002, 003…010, 011, 012…099, 100, 101
may be this works.
EDIT: Not working
2 Likes
dora_paz
(Dora)
#13
It is working , just use a global variable
2 Likes
i guess it’s about using text blocks ( Strigns ) instead of math blocks ( Integers ) :
probably because leading zeros are getting automatically removed, when using math blocks, but not with strings:
2 Likes
Rogerio_Rios
(Professional Support)
#15
Every number 0 to the left … is ignored
In the string 0 on the left … It is valid
In Sort list blocks the numbers are being treated as strings.
In BubbleSort blocks the numbers are being treated as numbers.
3 Likes
system
(system)
Closed
#16
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.