![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Skiplist Topic Summary: How to ensure Skiplis sorts correctly when Object Number is the key Created On: 13-May-2005 08:23 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Numbers are being sorted in ASCII order, so 1.13 comes before 1.2. Pad the numbers out with zeroes and then they can be used for sorting. The attached (sorry, but I can't remember who I got this from) utilities do the padding for you. | |||
![]() |
|||
We are using Object Number as key in a Skip, but the order of the objects when listing the Skip contents is not as expected. Instead of being in increasing order, it seems a bit random.
Any ideas, tips? Thanks ------------------------- Pieter de Waard www.nhindustries.com |
|||
![]() |
|||
![]() |
|||
Numbers are being sorted in ASCII order, so 1.13 comes before 1.2.
Pad the numbers out with zeroes and then they can be used for sorting. The attached (sorry, but I can't remember who I got this from) utilities do the padding for you.
------------------------- Tony Goodman http://www.smartdxl.com |
|||
![]() |
|||
![]() |
|||
Deleted.
Edited: 13-May-2005 at 13:17 by Peter Seager |
|||
![]() |
|||
![]() |
|||
Thanks Tony.
Our work-around boiled down to the same thing, but not exactly: we stripped out the dots, concatenated the whole lot, and worked with the resulting value. But this breaks down as soon as numbers are getting double-digit in the "wrong place" in the Object Number. e.g. 1.3.1.10 -> 13110 is bigger than 1.3.2.1 -> 1321, which is incorrect. So your solution is better. ------------------------- Pieter de Waard www.nhindustries.com |
|||
![]() |
Telelogic DOORS
» DXL Exchange
»
Skiplist
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.