Skip to content
Tcl Source Code View Ticket
Login

View Ticket

bug in manpage of lset

Closed / Fixedad8df845fef2c76d95b9f1aaa4815f3b23d4c472Created 7 years agoUpdated 6 years ago
Descriptionplain2020-04-25 16:22:38
Here it is: https://www.tcl-lang.org/man/tcl/TclCmd/lset.htm

In the man page of "lset", section EXAMPLES, the last example of the first example list is incorrect (I have tried it in tclsh of 8.6). The example states:

set x [list [list a b c] [list d e f] [list g h i]]
lset x {2 3} j
   → list index out of range

but second index "3" is still ok, it extends the third sublist:
→ {a b c} {d e f} {g h i j}

Probably the example should be changed to use index "4" instead of "3":

lset x {2 4} j → list index out of range
Referenced by1
andy (claiming to be Andy Goth)wiki2020-06-19 06:06:56
andy Closed ticket [ad8df845fe]. [History diff]2020-06-19 06:07:59
Log in (anonymous is fine) to add a comment.