Manifest of check-in
[b6eed8b994]
- 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.
by
core5 on
2026-10-24 23:36:48.
B d6dd6d0f71d00a6a69879c9963973d9ca9b532a6188cc7a8ddabe6df42ffff67
C TIP\s672:\sadd\s$((expr))\sexpression\ssubstitution\r\n\r\n$((expr))\sis\sa\sshortcut\sfor\s[expr\s{expr}],\susable\swherever\s$\ssubstitution\r\nworks:\swords,\squoted\sstrings,\ssubst\sand\sTcl_ParseVarName.\sThe\sbody\sis\sparsed\r\nonce,\sas\sthe\sargument\sof\sa\sbraced\sexpr,\sso\snothing\sis\ssubstituted\stwice.\r\n\r\nNew\stoken\stype\sTCL_TOKEN_EXPR_SUBST.\ssubst\sgains\s-expressions\sand\r\n-noexpressions;\s-nocommands\sand\s-novariables\salso\sturn\sit\soff.\sThe\sbuild\r\nswitch\sTCL_EXPR_SUBST_PARENS\sselects\sthe\strigger:\s$((\s(default)\sor\s$(.\r\nIncludes\sdocumentation\sand\s107\snew\stests.\r\n
D 2026-10-24T23:36:48.725
F doc/ParseCmd.3 44d3898847f08cef0835d0417708b36c92acff89bc8a9785e51269a53de5f5d9
F doc/SubstObj.3 2316bd1f1450f49513f6075f07e8820e8953160c7293fddcaac8c5934b64c96a
F doc/Tcl.n ee5f66eb76beedc994a75b68db27e2bf852509e8281d6e1b8af83e41165d6fcf
F doc/subst.n af80d01489d36b602927639ca6ac703cde25e509acb24111392683d28beeae9d
F generic/tcl.h 3646d333e3c73336339dafd2ce918a30fa56f3002dada77ccabb4f556297d4e5
F generic/tclCmdMZ.c 8b0902cea3be6212d7a4298700a5d8321d13573a5825b18c1cc8e93dfe405bcc
F generic/tclCompCmdsSZ.c d1b651ed6461dbbb516bb0e9325bd75ffd2a2b236e613176d3ce355f38c4335c
F generic/tclCompExpr.c 2f678b6a807682e05a03f3f43deae05e2fcdd95cd43dd2597635f7758507f46a
F generic/tclCompile.c ef65e1c88f9bb3b129aafe3b7bba3b9865b14f93de2ce4a9a95f0214c12ac0c6
F generic/tclParse.c e729f94830af48da526196141df3420b19f7b0fef0783e8870d936cd3770e5bc
F generic/tclTest.c 077238c5af2c9bf474d98de0694f351f224bf6c0b7c4f824ddff34b01aeb1011
F tests/compile.test c682b5da54d981e3722111ef8f3edf5080a71a3878f0314933a72e968ae886e1
F tests/parse.test 85ada975b5790dca12f2191ece4777ab8ff6df7ae2c4a41e4aa0c849add90b00
F tests/parseOld.test ce1cacd9dfc0e972ce41bdff16b74b1189c56071d650e5abb8aa05e2131d6641
F tests/subst.test 67a4134ceb6bbf9502b9a26e9d8f80323706786cff552ae35a17c5b9575a972e
P d6dd6d0f71d00a6a69879c9963973d9ca9b532a6188cc7a8ddabe6df42ffff67
R 9d5be4d9f5dc482e9533ba28a16e2e51
T *branch * tip-672-v2
T *sym-tip-672-v2 *
T -sym-main *
T -sym-trunk *
U core5
Z 977d294650064d580d7553ca4908f7b0