Sujet : Re: can this work?
De : saitology9 (at) *nospam* gmail.com (saito)
Groupes : comp.lang.tclDate : 22. Mar 2025, 13:44:21
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vrmbb6$3vamk$1@dont-email.me>
References : 1 2 3 4
User-Agent : Mozilla Thunderbird
On 3/21/2025 6:56 PM, Rich wrote:
When the parser is parsing the command, the third "word" of the first
for loop is:
"\$i $op \$q"
Due to rule four, variable substitution and backslash substution is
performed on this word, because it is double quoted.
I read "double quoted" a few times - I think you meant "double-quote'd".
So since it double-quoted, the substitutions occur as you described. And whatever results from that becomes a "static" argument/parameter to the for-loop. Is this right? I recall warnings against using double quotes with loops since the substitution occurs once.
I guess I could benefit from this if you explain why the for-loop keeps re-evaluating a double-quoted string.