160x600, August 2011 Home Contents In this part of the tutorial, we will cover Tcl procedures. LargeSquare A procedure is a code block containing a series of commands. Procedures are called functions in some programming languages. It is a good programming practice that procedures do only one specific task. Procedures bring modularity to programs. Proper use of procedures bring the following advantages: Reducing duplication of code Decomposing complex problems into simpler pieces Improving clarity of the code Reuse of code Information hiding There are two basic types of procedures. Built-in procedures and user defined ones. The built-in procedures are part of the Tcl core language. Examples are: rand() , sin() or exp() . The user defined functions are functions created with the proc keyword. The term procedures and commands are often used interchangeably. In...