Sujet : Re: can this work?
De : saitology9 (at) *nospam* gmail.com (saito)
Groupes : comp.lang.tclDate : 21. Mar 2025, 22:07:38
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vrkkeq$2c2m0$1@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 3/21/2025 3:34 PM, Emiliano wrote:
On Fri, 21 Mar 2025 10:25:17 -0400
Several. Here are two
for {set i 1} "\$i $op \$q" {incr i} {puts $i}
or
for {set i 1} [format {$i %s $q} $op] {incr i} {puts $i}
Nice solutions, especially the former one. I am surprised that the double-quotes work here, with repeated evaluations. Nice approach.
And [format] looks suspicious in its use here :-)
I myself stumbled upon an approach with [expr] earlier.