subst(n) Tcl Built-In Commands subst(n) _________________________________________________________________ NAME subst - Perform backslash, command, and variable substitu- tions SYNOPSIS subst ?-nobackslashes? ?-nocommands? ?-novariables? _s_t_r_i_n_g _________________________________________________________________ DESCRIPTION This command performs variable substitutions, command sub- stitutions, and backslash substitutions on its _s_t_r_i_n_g argu- ment and returns the fully-substituted result. The substi- tutions are performed in exactly the same way as for Tcl commands. As a result, the _s_t_r_i_n_g argument is actually sub- stituted twice, once by the Tcl parser in the usual fashion for Tcl commands, and again by the _s_u_b_s_t command. 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 interpre- tation. Note: when it performs its substitutions, _s_u_b_s_t does not give any special treatment to double quotes or curly braces. For example, the script set a 44 subst {xyz {$a}} returns ``xyz {44}'', not ``xyz {$a}''. KEYWORDS backslash substitution, command substitution, variable sub- stitution Tcl Last change: 7.4 1