Skip to content
Tcl Source Code View Ticket
Login

View Ticket

concat documentation

Closed / Fixed62b36e326c027b4f3af1269b721b3c737718a37fCreated 10 years agoUpdated 10 years ago
Descriptionplain2016-08-25 10:02:41
The description is misleading: "This command joins each of its arguments together with spaces after trimming leading and trailing white-space from each of them. "

Because:

% concat a {} b
a b

Based on the documentation there should be two spaces between a and b.
Referenced by3
  • 53cdc09f00[62b36e326c] Noted edge case in behaviour of [concat] with empty arguments. check-in2016-10-09 16:02:38
  • 007b192adb[62b36e326c] Noted edge case in behaviour of [concat] with empty arguments. check-in2016-10-09 16:02:16
  • d81d0de334[62b36e326c] Noted edge case in behaviour of [concat] with empty arguments. check-in2016-10-09 16:01:53
dkfwiki2016-10-09 15:57:12

Hmm, the implementations of Tcl_Concat and Tcl_ConcatObj have a specific check for an empty element (after trimming) so I'm guessing this is deliberate. Probably by JO too.

dkfwiki2016-10-09 16:00:23

And it turns out that it is documented for Tcl_Concat, but not for concat.

dkf Closed ticket [62b36e326c]. [History diff]2016-10-09 16:02:51
dkfwiki2016-10-09 16:04:49

Added this to docs:

Arguments that are empty (after trimming) are ignored entirely.
Which is exactly what was happening. It'd just never been noted at this level of documentation before.

Log in (anonymous is fine) to add a comment.