[array names -inorder name] 
Author Message
 [array names -inorder name]

Has anyone cooked up a version of array commands that returns elements
or the subscripts in the order they were entered?

Thanx,
jh



Fri, 01 Mar 2002 03:00:00 GMT  
 [array names -inorder name]

Quote:

> Has anyone cooked up a version of array commands that returns elements
> or the subscripts in the order they were entered?

This would be TclX keyed lists.  There is no way to do this with the
current Tcl array mechanism, because it is purely hash table based.
You would have to keep extra structure data to maintain order.  That
really becomes a different kind of data structure (different big-O
characteristics).  Thus you have TclX keyed lists.

--
   Jeffrey Hobbs                          The Tcl Guy
   jeffrey.hobbs at scriptics.com         Scriptics Corp.



Fri, 01 Mar 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. array name ARRAY regexp

2. how to access arrays with variable for array names and index

3. access to array if name of array is variable

4. HOWTO: reference elements of an array if array name is in a variable

5. What is the name of the function named + ?

6. Alias name vs. folderitem.name

7. DOS File Lookup - just the file name, not the path AND file name

8. field name and key name as a variable

9. field name and key name as a variable

10. A Standard name for .NAME

11. mkdir same name as file name

12. file name vs. real name

 

 
Powered by phpBB® Forum Software