parray improvements
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

parray improvements

From: Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at>
Date: Fri Jun 03 2005 - 10:13:48 CEST

For the need to write out the contents of an array to a file,
I had a look into $tcl_library/parray.tcl and found two (minor)
things:

1.) for finding the longest key, it traverses the *lsorted*
   list. Here, sorting is just a waste of cpu-cycles.
   (as opposed to sorting in the actual output-loop)

2.) I wonder, if it could be easily extended with a few options
   to puts the formatted text to a specified channel (rather than
   to hardcoded stdout), or evenmore: to just return the text.
Received on Thu Sep 29 14:20:02 2005