Basic Commands

Suman Lata Tripathi, Abhishek Kumar, Jyotirmoy Pathak · 2022

This chapter reviews the basic commands, substitution and operators of tool command language (Tcl). The command can be either built-in or a user-defined procedure followed by arguments separated by whitespace. The set command initializes variables with a constant value. The value of a variable can be updated via the $ symbol; an argument declared with the $ symbol can be rewritten by the substitution of a value for the variable. Backslash substitution is slightly different from regular substitution (&), and it is presented by \&. Grouping and substitution are employed by the Tcl interpreter before it runs a command. Command substitution can relate to a single or more than one (nested) command, where the order of execution is followed from left to right (default). The Tcl script is a rich built-in operator and provides the following operators such as arithmetic operators, relational operators, logical operators, bitwise operators and ternary operators.

Read the paper · More papers on PaperTik