diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2019-04-01 10:51:33 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2019-04-01 10:51:33 (GMT) |
commit | 325bbf57920315a1457d500d5fec8867c0e0744b (patch) | |
tree | c104f7b971ed6af5ca0b9aad54b5dad57a78b23f /doc/dict.n | |
parent | 8d4509eafc4ae6d4ebc12d6b08180fca038bdf8f (diff) | |
download | tcl-325bbf57920315a1457d500d5fec8867c0e0744b.zip tcl-325bbf57920315a1457d500d5fec8867c0e0744b.tar.gz tcl-325bbf57920315a1457d500d5fec8867c0e0744b.tar.bz2 |
Document
Diffstat (limited to 'doc/dict.n')
-rw-r--r-- | doc/dict.n | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -120,6 +120,19 @@ It is an error to attempt to retrieve a value for a key that is not present in the dictionary. .RE .TP +\fBdict getwithdefault \fIdictionaryValue \fR?\fIkey ...\fR? \fIkey default\fR +.VS "8.7, TIP342" +This behaves the same as \fBdict get\fR (with at least one \fIkey\fR +argument), returning the value that the key path maps to in the +dictionary \fIdictionaryValue\fR, except that instead of producing an +error because the \fIkey\fR (or one of the \fIkey\fRs on the key path) +is absent, it returns the \fIdefault\fR argument instead. +.RS +.PP +Note that there must always be at least one \fIkey\fR provided. +.RE +.VE "8.7, TIP342" +.TP \fBdict incr \fIdictionaryVariable key \fR?\fIincrement\fR? . This adds the given increment value (an integer that defaults to 1 if |