![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Skip Ordering Topic Summary: Created On: 4-Dec-2007 19:13 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Did some tests on the order in which information is stored in Skip lists. As you know, after inserting the elements, the "for Data in skp do" loop should retrieve the information in the Skip in KEY sorted order. The attached DXL produces the results posted below.
Names3 uses the 'int' as the KEY, and they are retrieved in KEY (int) order (1,2,3). Names1 and Names2 use the 'string' as the KEY. The difference between Names1 and Names2 is simply that Names1 is create via 'create()' (line 1), and Names2 uses 'createString()' (line 2). I notice that Names2 are retrieved in KEY (alpha) order (A,B,C), but Names1 are retrieved in insert order (B,A,C). I conclude that you should routinely use 'createString' for skips that have a string as the KEY, and use 'create' for all other skips; unless for sure you know what you are doing. I don't know what to think about the difference in the processing, however. Perhaps its just a coincedence that Names1 are retrieved in insert order ..err.. perhaps because the addresses used are sequencial in memory. ** RESULTS OF DXL FOLLOW ** Names1: 1 B 3 A 2 C Names2: 3 A 1 B 2 C Names3: 1 B 2 C 3 A |
|
![]() |
|
![]() |
|
Just FYI from the DXL Reference Manual.
There are two ways of avoiding this problem. The first is to use the createString form of the function for a skip list with a string key. The alternative is to ensure that all literal strings used as keys are concatenated with the empty string. ![]() ------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
Yes I read that. So I added a 4th skip which inserted the string concatenated with an empty string, and the results were different than any of the other 3; display order was in reverse of insert order.
Don't recall much about my direct-indirect-descripter course back in the "Amish University of Computer Black Magic Technology" (final was in punch-cards), but I suppose I may have been able to figure this out if I thought about it back then. - Louie |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Skip Ordering
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.