Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
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
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Tony Goodman, on Monday, May 16, 2005 8:58 AM

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.
 13-May-2005 08:23
User is offline View Users Profile Print this message


Pieter DE WAARD

Posts: 73
Joined: 11-Jul-2003

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
Report this to a Moderator Report this to a Moderator
 13-May-2005 09:29
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Answer 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.


lexnum.inc
lexnum.inc  (2 KB)



-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 13-May-2005 13:13
User is offline View Users Profile Print this message


Peter Seager

Posts: 32
Joined: 10-Feb-2003

Deleted.

Edited: 13-May-2005 at 13:17 by Peter Seager
Report this to a Moderator Report this to a Moderator
 16-May-2005 09:06
User is offline View Users Profile Print this message


Pieter DE WAARD

Posts: 73
Joined: 11-Jul-2003

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
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.