aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2010-10-20 10:18:51 +1000
committerSteve Bennett <steveb@workware.net.au>2010-10-20 10:20:21 +1000
commitab0534c54bb78a72e1f7b803b335fd16142dd026 (patch)
tree0805c9487f8a22864cf956690e186c694e0a953f
parent2d499dd0fd27436b64777396e1ebd9ae7774d674 (diff)
downloadjimtcl-ab0534c54bb78a72e1f7b803b335fd16142dd026.zip
jimtcl-ab0534c54bb78a72e1f7b803b335fd16142dd026.tar.gz
jimtcl-ab0534c54bb78a72e1f7b803b335fd16142dd026.tar.bz2
Document dict keys and lsort -index
Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r--Tcl_shipped.html28
-rw-r--r--jim_tcl.txt14
2 files changed, 39 insertions, 3 deletions
diff --git a/Tcl_shipped.html b/Tcl_shipped.html
index 1fb31eb..71a9882 100644
--- a/Tcl_shipped.html
+++ b/Tcl_shipped.html
@@ -816,6 +816,16 @@ Add support for <em>after <strong>ms</strong></em>, <em>after idle</em>, <em>aft
<em>exec</em> now sets environment based on $::env
</p>
</li>
+<li>
+<p>
+Add <em>dict keys</em>
+</p>
+</li>
+<li>
+<p>
+Add support for <em>lsort -index</em>
+</p>
+</li>
</ol></div>
<div class="paragraph"><p>Since v0.61:</p></div>
<div class="olist arabic"><ol class="arabic">
@@ -2872,6 +2882,17 @@ command. The legal <strong>options</strong> are:</p></div>
</p>
</dd>
<dt class="hdlist1">
+<strong>dict keys</strong> <em>dictionary ?pattern?</em>+
+</dt>
+<dd>
+<p>
+ Returns a list of the keys in the dictionary.
+ If pattern is specified, then only those keys whose
+ names match <strong>pattern</strong> (using the matching rules of string
+ match) are included.
+</p>
+</dd>
+<dt class="hdlist1">
<strong>dict set</strong> <em>dictionaryName key ?key &#8230;? value</em>+
</dt>
<dd>
@@ -4250,7 +4271,7 @@ the list are to be matched against pattern and must have one of the values below
</div>
<div class="sect2">
<h3 id="_lsort">lsort</h3>
-<div class="paragraph"><p><tt><strong>lsort</strong> ?<strong>-integer</strong>|<strong>-command</strong> <em>cmdname</em>? ?<strong>-decreasing</strong>|<strong>-increasing</strong>? <em>list</em></tt></p></div>
+<div class="paragraph"><p><tt><strong>lsort</strong> ?<strong>-index</strong> <em>listindex</em>? ?<strong>-integer</strong>|<strong>-command</strong> <em>cmdname</em>? ?<strong>-decreasing</strong>|<strong>-increasing</strong>? <em>list</em></tt></p></div>
<div class="paragraph"><p>Sort the elements of <strong>list</strong>, returning a new list in sorted order.
By default, ASCII sorting is used, with the result in increasing order.</p></div>
<div class="paragraph"><p>If <strong>-integer</strong> is specified, numeric sorting is used.</p></div>
@@ -4260,6 +4281,9 @@ which should return <em>-1</em> if <strong>$value1</strong> is less than <strong
they are equal, or <em>1</em> otherwise.</p></div>
<div class="paragraph"><p>If <strong>-decreasing</strong> is specified, the resulting list is in the opposite
order to what it would be otherwise. <strong>-increasing</strong> is the default.</p></div>
+<div class="paragraph"><p>If <strong>-index listindex</strong> is specified, each element of the list is treated as a list and
+the given index is extracted from the list for comparison. The list index may
+be any valid list index, such as <em>1</em>, <em>end</em> or <em>end-2</em>.</p></div>
</div>
<div class="sect2">
<h3 id="_open">open</h3>
@@ -6374,7 +6398,7 @@ official policies, either expressed or implied, of the Jim Tcl Project.</tt></pr
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Last updated 2010-10-20 10:12:09 EST
+Last updated 2010-10-20 10:19:44 EST
</div>
</div>
</body>
diff --git a/jim_tcl.txt b/jim_tcl.txt
index 0e9a780..70fa188 100644
--- a/jim_tcl.txt
+++ b/jim_tcl.txt
@@ -82,6 +82,8 @@ Since v0.62:
20. Add 'info references'
21. Add support for 'after *ms*', 'after idle', 'after info', 'update'
22. 'exec' now sets environment based on $::env
+23. Add 'dict keys'
+24. Add support for 'lsort -index'
Since v0.61:
@@ -1693,6 +1695,12 @@ command. The legal *options* are:
be the value for that key. It is an error to attempt to retrieve
a value for a key that is not present in the dictionary.
+*dict keys* 'dictionary ?pattern?'+::
+ Returns a list of the keys in the dictionary.
+ If pattern is specified, then only those keys whose
+ names match *pattern* (using the matching rules of string
+ match) are included.
+
*dict set* 'dictionaryName key ?key ...? value'+::
This operation takes the *name* of a variable containing a dictionary
value and places an updated dictionary value in that variable
@@ -2799,7 +2807,7 @@ the list are to be matched against pattern and must have one of the values below
lsort
~~~~~
-+*lsort* ?*-integer*|*-command* 'cmdname'? ?*-decreasing*|*-increasing*? 'list'+
++*lsort* ?*-index* 'listindex'? ?*-integer*|*-command* 'cmdname'? ?*-decreasing*|*-increasing*? 'list'+
Sort the elements of *list*, returning a new list in sorted order.
By default, ASCII sorting is used, with the result in increasing order.
@@ -2814,6 +2822,10 @@ they are equal, or '1' otherwise.
If *-decreasing* is specified, the resulting list is in the opposite
order to what it would be otherwise. *-increasing* is the default.
+If *-index listindex* is specified, each element of the list is treated as a list and
+the given index is extracted from the list for comparison. The list index may
+be any valid list index, such as '1', 'end' or 'end-2'.
+
open
~~~~
+*open* 'fileName ?access?'+