Category:Tcl: Difference between revisions

Content added Content deleted
(→‎Key Commands: Described another important command)
m (→‎Key Commands: increase syntax consistency)
Line 84: Line 84:
:Generate an error exception. The additional optional arguments allow finer control over the exception.
:Generate an error exception. The additional optional arguments allow finer control over the exception.
'''eval''' ''arg''...
'''eval''' ''arg''...
:Concatenate the arguments and evaluate the resulting string as a script. Note that from Tcl 8.5 onwards, this should only be used very rarely; the expansion syntax covers the vast majority of previous uses for <tt>eval</tt>.
:Concatenate the arguments and evaluate the resulting string as a script. Note that from Tcl 8.5 onwards, this should only be used very rarely; the expansion syntax covers the vast majority of previous uses for '''eval'''.
'''list''' ''arg''...
'''list''' ''arg''...
:Create a list out of the arguments and return it. The resulting list is also guaranteed to be a well-formed script that will evaluate the sequence of arguments as a command and arguments without further substitution, making the '''list''' command useful for predictable code synthesis.
:Create a list out of the arguments and return it. The resulting list is also guaranteed to be a well-formed script that will evaluate the sequence of arguments as a command and arguments without further substitution, making the '''list''' command useful for predictable code synthesis.