Skip to content
Tcl Source Code Changes To Proposed changes to the Tcl/Tk manual pages
Login

Changes To Proposed changes to the Tcl/Tk manual pages

Changes to "Proposed changes to the Tcl/Tk manual pages" between 2025-12-03 11:22:12 and 2025-12-07 15:45:12

︙
50
51
52
53
54
55
56


















57
58
59
60
61
62
63
64
65
66

67
68
69
70
71
72
73
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83

84
85
86
87
88
89
90
91







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+









-
+








**In any case, it is also proposed to have a separate page actually explaining these terms and how to read the syntax (i.e. what does it mean when a term is printed in bold, italic, inside a pair of "?" and what the function of the "..." is.**

## Inconsistent use of command syntax in the SYNOPSIS

The syntax written in the "SYNOPSIS" section is also not consistent. E.g. some commands list the possible syntax with one line for each variant (e.g. [return](https://www.tcl.tk/man/tcl/TclCmd/return.html)). Others just use one line with the keyword "switches" and leave it to the DESCRIPTION to mention the possible forms (e.g. [lsort](https://www.tcl.tk/man/tcl/TclCmd/lsort.html)). The way that the syntax of a command is described in the SYNOPSIS should be the same for all manual pages.

## Capitalization of syntax elements

The Tcl commands are presented by sometimes giving the arguments names. The `after` manual page is on example. The command `after ms` is presented with the named argument "ms". This is fine and makes it easy for readers to know what the argument is supposed to mean. However, when used in the normal text these names are using upper case letters when they are at the beginning of the text of the beginning of a sentence. Example

> *Ms* must be an integer giving a time in milliseconds.

> ... that was previously scheduled. *Id* indicates which command ...

In a technical documentation such as the manual pages, consistency and accuracy are more important than traditional capitalization rules. If an argument is defined as *ms* or *id*, capitalizing it to *Ms* or *Id* at the start of a sentence could suggest it's a different argument, confuse readers who are looking for exact matches, break the mental model that technical identifiers are case-sensitive. Most technical documentation follows this practice. We should do so too. 

If this seems odd to some people, it may help to know that these terms will be rendered differently anyway and should be written using the semantic markdown outlined in TIP 700. This mean, the above sentences would turn into markdown like this:

> [ms]{.arg} must be an integer giving a time in milliseconds.

> ... that was previously scheduled. [id]{.arg} indicates which command ...

Imagine these arguments are rendered with a different font and colour (possibly with another background colour) consistent with how they look like in the command line definition itself, then capitalization does not make sense at all and the rendering makes sure that no-one really would expect this anymore.

# Changes in specific manual pages

## Tcl → Tcl.n

1. The Tcl.n page has a section "SYNOPSIS" but it contains nothing in terms of syntax compared to the other pages. It just says "Summary of Tcl language syntax". Unclear what to do about it here. Maybe, this page is a special case.


## Tcl → dict
1. `dict map` does not mention what happens with *valueVariable*. It should say: "... the result of the script is put into an accumulator dictionary using the key that is the current content of the keyVariable variable at that point and the return value of the script as the value for that key."
2. `dict for` could mention a bit clearer that it is an iterator just as `foreach` and others and works equivalently. It also seems wrong that TCL_CONTINUE should be the same as TCL_OK. (**DKF:** No, that's OK, it's equivalent to `for` and `foreach`; the TCL_CONTINUE doesn't need to come from the end of the body script, whereas the TCL_OK does.)
2. `dict for` could mention a bit clearer that it is an iterator just as `foreach` and others and works equivalently.


## Tcl → fconfigure
1. The text for the `-encoding` option does not specify how to spell the names of the encodings. As these are not the MIME/IANA names, a reference to `encoding name` will help to understand which encodings are available and how to spell them, also because they are case-sensitive ('UTF-8' is not recognized as it is not the same as 'utf-8').


## Tcl → file
︙