Home > Archive > Tcl > March 2008 > About if command
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Romit.Y 2008-03-27, 5:26 am |
| Everyone know: grouping words within dobule braces disables
substitution within braces. and then whether after if command expr
which grouping within braces disables substitution?
If the answer is yes, how does if command evaluate and substitution?
| |
| Aric Bills 2008-03-27, 5:26 am |
| When the Tcl interpreter encounters a Tcl command, it performs
substitution before it evaluates the command. If an argument to that
command is surrounded by {curly braces}, no substitution is performed
on that argument before the command executes. However, nothing
prevents the command from performing substitution on any of its
arguments, and that is basically what [expr] and [if] do. So, the
substitution takes place inside the command rather than before the
command executes.
Does that answer your question?
| |
| Romit.Y 2008-03-27, 5:26 am |
| On 3=D4=C227=C8=D5, =CF=C2=CE=E73=CA=B116=B7=D6, Aric Bills <aric.bi...@gmai=
l.com> wrote:
> When the Tcl interpreter encounters a Tcl command, it performs
> substitution before it evaluates the command. If an argument to that
> command is surrounded by {curly braces}, no substitution is performed
> on that argument before the command executes. However, nothing
> prevents the command from performing substitution on any of its
> arguments, and that is basically what [expr] and [if] do. So, the
> substitution takes place inside the command rather than before the
> command executes.
>
> Does that answer your question?
Thanks
|
|
|
|
|