![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: How do you Empty a Skip List Topic Summary: Created On: 21-Dec-2006 15:33 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: The only way to empty a skip list is to remove each entry individually using delete(skip, index). I would delete the skip and recreate it every time. if (!null skip) delete(skip) skip = create() | |
![]() |
|
I have a skiplist called "variant", and it gets populated several times in the same script. I want to empty it between uses though, and haven't figured out how. Right now, I'm using "variants == null", but that doesn't do it. I don't want to delete it, because then I would have to create it multiple times. Is there a way to just EMPTY a skip list?
|
|
![]() |
|
![]() |
|
The only way to empty a skip list is to remove each entry individually using delete(skip, index).
I would delete the skip and recreate it every time. if (!null skip) delete(skip) skip = create() ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
OR, you can use the brute force method by deleting the skip list and then recreate it.
delete(variant) -- EDIT MESSAGE: Sorry Tony I didn't see that you recommend delete as well. I don't want to steal your thunder here so credit goes to you. ------------------------- pete.kowalski(at)motorola.com Edited: 21-Dec-2006 at 15:58 by Pete Kowalski |
|
![]() |
|
![]() |
|
That's what I was afraid of. Thanks for the quick response guys!
Mike. |
|
![]() |
Telelogic DOORS
» General Discussion
»
How do you Empty a Skip List
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.