4 ms·
It will work because the value passed to proc multiline within the curly braces is treated as a string without substitutions, that value is then passed to the r
by blacksqr 5y ago
It will work because the value passed to proc multiline within the curly braces is treated as a string without substitutions, that value is then passed to the regsub command which replaces all newlines in the string with spaces, then the result is passed to uplevel, which is basically "eval this string in the scope context where multiline was called". It's uplevel that does all the variable substitution, using any values defined in the scope where multiline was executed.