If any of the -nobackslashes, -nocommands, or -novariables are specified, then the corresponding substitutions are not performed. For example, if -nocommands is specified, no command substitution is performed: open and close brackets are treated as ordinary characters with no special interpretation.
If a break exception occurs during the evaluation of a command substitution, the result of the substitution will be the string (as substituted) up to the start of the command substitution. If a continue exception occurs during the evaluation of a command substitution, an empty string will be substituted for that entire command substitution (as long as it is well-formed Tcl.)
set a 44 subst {xyz {$a}}returns ``xyz {44}'', not ``xyz {$a}'' and the script
set a "p\} q \{r" subst {xyz {$a}}return ``xyz {p} q {r}'', not ``xyz {p\} q \{r}''.
The continue and break exceptions allow command substitutions to prevent substitution of the rest of the command substitution and the rest of string respectively, giving script authors more options when processing text using subst. For example, the script
subst {abc,[break],def}returns ``abc,'', not ``abc,,def'' and the script
subst {abc,[continue;expr 1+2],def}returns ``abc,,def'', not ``abc,3,def''.
Copyright © 1994 The Regents of the University of California. Copyright © 1994-1996 Sun Microsystems, Inc. Copyright © 2001 Donal K. Fellows Copyright © 1995-1997 Roger E. Critchlow Jr.