Thursday, 12 September 2013

Confusion in TCL substitution

Confusion in TCL substitution

I am confused with the following statements .
1) % set a \\\w
\w
2)% set a \\w
\w %
3) % set a \w
\w
% %
In the First statement I am having 5 (backslashes) and it produced 2
(backslashes) as output.
In the second statement I am having 4 (backslashes) and it produced 2
(backslashes) as output.
In the Third statement I am having 2 (backslashes) and it produced 1
(backslashes) as output.
Up to my knowledge '\' is equal to '\' after substitution .
As it is '\\\' it should return single '\' na.
Can Anyone Please Explain me how the substitution occures.

No comments:

Post a Comment