Version 5 of Tcl Learning Exercises

Updated 2013-06-14 06:01:45 by pooryorick

http://www.equi4.com/pub/om/pub/tclerswiki.png

Intro

A list of exercises for those learning Tcl

Description

In the process of Learning Tcl, it can be helpful to have a set of references exercises that serves as an additional resource to other curricula. The following is a list of exercises that can be practiced in order to become a more proficient Tcl programmer.

After an exercise is complete, post your work somewhere and ask the community to try to break it. You can learn a lot this way!

Guidelines for Contributors

The exercises should be written so as to maximize their educational value. Each exercise should try to introduce at most one concept not yet been introduced by previous exercises, with the minimal amount of specification necessary to illustrate the concept. It should be possible to write a solution that doesn't require much auxiliary code.

Exercises

re-order
Write a procedure that takes one argument, $word, which is a single English word, and re-orders the letters so that they are in alphabetical order ("A" before "a", and "a" before "B").
dedent
Write a procedure that takes one argument, $text and removes the common leading whitespace characters from all the lines of $text. When determining what is common whitespace, don't use the contents of lines containing only whitespace, and remove all whitespace from such lines