Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
For 2023 - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
Brackets and Braces in Tcl


One of the big issues that newcomers feel is most difficult to get their head around in Tcl is when to use square brackets, when to use round brackets, and when to use curly braces.


SQUARE BRACKETS are used to define a block that's run BEFORE the rest of the command on the current line, and the result is substituted into the line.

CURLY BRACES are used to define a block that's deferred - in other words it may be run AFTER the rest of the command on the current line.


ROUND BRACKETS are different - they're used either to indicate an array subscript, or to alter operator precedence in an expr command. They are not used in command precedence.

How do I help people remember this? I often equate the Square brackets with the very irritating Donkey in the Shrek Movies that always saying "Pick me ... pick me" ... an irritating but, as it turns out, very necessary and faithful friend.

Donkey Week Horseshoe Sidmouth 2005

This image is reproduced with permission of hobby-box.co.uk where painted horseshoes are offered for sale in support of The Donkey Sanctuary, near Sidmouth, Devon

See also Tcl training course

Please note that articles in this section of our web site were current and correct to the best of our ability when published, but by the nature of our business may go out of date quite quickly. The quoting of a price, contract term or any other information in this area of our website is NOT an offer to supply now on those terms - please check back via our main web site

Related Material

Tcl/Tk - Tcl Fundamentals
  [3] - ()
  [210] - ()
  [328] - ()
  [349] - ()
  [362] - ()
  [782] - ()
  [1136] - ()
  [1282] - ()
  [1426] - ()
  [1469] - ()
  [2442] - ()
  [3917] - ()
  [4324] - ()
  [4453] - ()

Tcl/Tk - A Review of Tcl and Tk Basics
  [1092] - ()
  [1174] - ()
  [1181] - ()
  [1469] - ()
  [4208] - ()

resource index - TclTk
Solutions centre home page

You'll find shorter technical items at The Horse's Mouth and delegate's questions answered at the Opentalk forum.

At Well House Consultants, we provide training courses on subjects such as Ruby, Lua, Perl, Python, Linux, C, C++, Tcl/Tk, Tomcat, PHP and MySQL. We're asked (and answer) many questions, and answers to those which are of general interest are published in this area of our site.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2023: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/solutions/tcl-brac ... n-tcl.html • PAGE BUILT: Wed Mar 28 07:47:11 2012 • BUILD SYSTEM: wizard