Overview
| Comment: | TIP 672: add $((expr)) expression substitution $((expr)) is a shortcut for [expr {expr}], usable wherever $ substitution works: words, quoted strings, subst and Tcl_ParseVarName. The body is parsed once, as the argument of a braced expr, so nothing is substituted twice. New token type TCL_TOKEN_EXPR_SUBST. subst gains -expressions and -noexpressions; -nocommands and -novariables also turn it off. The build switch TCL_EXPR_SUBST_PARENS selects the trigger: $(( (default) or $(. Includes documentation and 107 new tests. |
|---|---|
| Timelines: | family | ancestors | descendants | both | tip-672-v2 |
| Files: | files | file ages | folders |
| SHA3-256: |
b6eed8b994e311e8bacd269f58339db8 |
| User & Date: | rocketship98 on 2026-10-24 23:36:48.725 |
| Original User & Date: | core5 on 2026-10-24 23:36:48.725 |
| Other Links: | branch diff | manifest | tags |
Context
|
2026-10-26
| ||
| 02:57 | Guard against stack overflow from deeply nested $((expr)): apply the same nesting limit as TclCompil... check-in: 24c265df9a user: rocketship98 tags: tip-672-v2 | |
|
2026-10-24
| ||
| 23:36 | TIP 672: add $((expr)) expression substitution $((expr)) is a shortcut for [expr {expr}], usable ... check-in: b6eed8b994 user: rocketship98 tags: tip-672-v2 | |
| 15:07 | More marking of default switch branches as unreachable check-in: d6dd6d0f71 user: dkf tags: trunk, main | |
Changes
Modified doc/ParseCmd.3
from [e6372b0a40]
to [44d3898847].
[diff]
Modified doc/SubstObj.3
from [855a9a3e2d]
to [2316bd1f14].
[diff]
Modified doc/Tcl.n
from [07b1408961]
to [ee5f66eb76].
[diff]
Modified doc/subst.n
from [6c94dd81f0]
to [af80d01489].
[diff]
Modified generic/tcl.h
from [b6a122b16a]
to [3646d333e3].
[diff]
Modified generic/tclCmdMZ.c
from [5c433dba22]
to [8b0902cea3].
[diff]
Modified generic/tclCompCmdsSZ.c
from [58af45a3e0]
to [d1b651ed64].
[diff]
Modified generic/tclCompExpr.c
from [d6609b5efb]
to [2f678b6a80].
[diff]
Modified generic/tclCompile.c
from [10aa26c1cb]
to [ef65e1c88f].
[diff]
Modified generic/tclParse.c
from [0d7491bf57]
to [e729f94830].
[diff]
Modified generic/tclTest.c
from [cb953be7c6]
to [077238c5af].
[diff]
Modified tests/compile.test
from [377a8a366e]
to [c682b5da54].
[diff]
Modified tests/parse.test
from [7dc54958a5]
to [85ada975b5].
[diff]
Modified tests/parseOld.test
from [1f4cf85bbd]
to [ce1cacd9df].
[diff]
Modified tests/subst.test
from [8631f9c446]
to [67a4134ceb].
[diff]