Training, Open Source computer languages

PerlPythonMySQLTclRubyC & C++LuaJavaTomcatPHPhttpdLinux

Search our site for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
Quiz Page tcl
The tcl quiz has changed! We have replaced tcl questions with answers! And from those answers you'll find further links to even more information - forums where you can ask questions, training courses, longer articles, and more. [link to quiz index] ... If you really want the old quiz questions, you can find them here, here, here and here ... and with onward links to the possible answers to each question too.

Niche businesses in Melksham. From glass painting to Tcl and Lua courses.
Melksham has a number of excellent shops and other establishments selling niche products and services - things that you won't find in other nearby towns or (in some cases) in any other towns at all. ...

Expanding a list of parameters in Tcl - {*} and eval
In Tcl commands, parameters are separated by spaces, just like Tcl lists are. So it would sometimes be very useful to be able to write   set action {piemiddle apple}   set ...

Tcl collections - lists, dicts and array
In Tcl, almost all variables are what is described as "pure" - which means that they hold data as strings of text which can be passed, substituted with a $ prefix, etc. Special interpretation on pure ...

Tcl - apparently odd behaviour of string trimleft
Question: Why does this code:   set dir "D:/JNN/proc/"   set tempname "D:/JNN/proc/Doc-99887767.dat"   set cname [string trimleft $tempname $dir]   puts ...

Multiple buttons calling the same proc in wish (tcl/tk)
Question: 1. I have created a table dynamically using a for loop in Tcl/Tk. 2. One of the columns in the table is a column of buttons 3. All the buttons call the same action proc as the each do ...

Adding Expect on top of Tcl - what is it and where can I get a training course to learn about it?
Expect adds extra commands on top of Tcl - allowing the Tcl programmer to control additional processes as is they were really being run from the command line. But because they're being run from ...

Comparing loop commands in Tcl
Tcl offers you three different loop commands - here they are generating the same output: while A condition is tested, and if true the commands in a loop are performed. The condition is then retested ...

Trapping errors in Tcl - the safety net that catch provides
What could possibly go wrong when you open a file in a program? Lots of things, actually. * You could try to open a file in directory you cannot access * You could try to read from a file that does ...

Searching through all the files in or below a directory - Ruby, Tcl, Perl
Many of our customers want to learn how to traverse all the files in a directory, or perhaps even all the files in or below a directory. I quite often write a demonstration program during our courses ...

Tcl packages, pkg_mkIndex, pkgIndex.tcl -what are they and why use them.
In the previous article [here], I wrote about namespaces and how - as our program grows - we need to keep named pieces of code and globally accessible variable in their own groups. And we do so using ...

Storing Tcl source code encoded, and running via your own C program
Tcl is a language. And Tcl is also a C library. How's that? Tcl originates from a requirement to provide a taioring capability within C programs that could be accessed in a program-like style. And ...

User defined sorting and other uses of callbacks in Tcl and Tk
When I output a table of results, I usually want it to be sorted in some way. In Tcl, I can use lsort to sort a list - there's an example of it running in a default way [here]. However, there's ...

Passing back multiple results in Tcl - upvar and uplevel
What's the effect of having a meal? There are many. "You're not hungry any more" is the obvious answer, but also "there's washing up to do", "there's a gap on the shelves" and so on. And yet when ...

The difference between lists and strings - Tcl
There's not much difference between lists and strings in Tcl. In fact a list is just a string in a particular format, and if you split a string that contains just letters and spaces into a "list" you ...

Reading the nth line from a file (Perl and Tcl examples)
"How do I find the 100th line in a file" - a common question for newcomers to coding. The short answer is to open the file, and loop through to read lines until the one that you want. Although ...

Exceptions - Tcl style
Checking for all possible errors isn't a "failsafe" way of coding. If you try and check for absolutely any error, you're still very likely to miss one or two possibilities, and it's fare better to ...

Should we cover expect and/or Tk on our public Tcl courses?
A sizeable minority of our Tcl course delegates use the expect and / or tk extensions. And on our Tcl courses we handle the two differently. For Expect, we include some coverage in our standard ...

Extracting data from a string / line from file - Tcl
I never cease to be amazed at the number of different ways that data can be encoded into simple test lines ... and how the various languages that we teach can be used to manipulate / extract pertinent ...

What to do in the evening during a Tcl course
Our training centre is set in a lovely part of the UK ... so you can come here to learn to program in Tcl (this week's course) and in the eveing see some beautiful countryside. Or perhaps arrive a ...

Open Source (Public) courses - PHP, Tcl, SQL, Python, C and C++ in Melksham, Wiltshire, UK
Here's a revised list of public courses running at our Melksham training centre for the rest of this month, and in April and May. There are a couple of additions, and we've also reallocated a couple ...

Tcl - Some example of HOW TO in handling data files and formats
During the Tcl course I was running earlier this week, we got involved in a number of interesting topics such as • How to clean up input lines into lists of fields (use split) • How to ...

Tcl - the danger of square brackets in a while command
In Tcl, every statement is a command - with the parameters separated by spaces. Elements which are written in square brackets are commands which are evaluated before the rest of the statement, and ...

Lua, Tcl, Python; Worldwide training classes
The subjects we teach are used worldwide - there's just as much requirement to learn about Python in Salerno as there is in Swindon, about Tcl in Milwaukee as there is in Manchester, and about Lua in ...

Tcl - a great engineering language
It might be a little old and out of fashion - but Tcl is still very much in use, we use it and we can offer you a learning to program in Tcl training course if you're new to programming, or a Tcl ...

Tcl - uplevel to run code at calling level
Tcl procs (they're Tcl's functions) can pass information back via the return command, and they can access data in the top level of code via the global commands. Incoming parameters can be passed in ...

Quick easy and dangerous - automated logins via Tcl / Expect
Let me start with a security warning. Passwords and firewalls are there to make it difficult for unauthorized users to get through / at systems, and if you write a script which automates passwords ...

Using Tcl and Expect to automate repetitive jobs
If you're typing the same series of instructions into your computer time and time again, perhaps with predictable variations depending on the responses that you get, you should consider using Expect. ...

split and join in tcl and expect
Split and join in most languages convert strings of text into arrays / lists / collections of other sorts. But in Tcl, all variables are held as strings, so are split and join actually needed? If ...

What are Tcl lists?
In Tcl, all variables (except 'arrays') are held as strings of text - and that includes lists. A list is a string which is treated as a collection of individual words, space separated, and you can ...

Tcl - catching an error before your program crashes
There are times when a Tcl command can fail because of the data being passed in to it ... and when it fails, it can do so with a spectacular crash! For example, the glob command which matches files ...

Tcl - passing arrays and strings in and back out of procs
When you want to pass data INTO a proc in Tcl from a regular variable, you write the variable name with a $ in front of it in the code and the value is substituted. But this doesn't work if (a) you ...

Tcl - a true interpretive, command based language
Tcl is a very different language to the others that I give courses on - it's a truly interpretive language who's structure is based on commands rather than operators and operands. Thank sounds a bit ...

Variable storage - Perl, Tcl and Python compared
From Monday to Wednesday, I was teaching Python to a group of delegates at a company where I have previously taught Tcl and Expect and Perl. And this interesting diagram shows just what a contrast ...

Tcl scripts / processes on a web server via CGI
If you have programs / scripts / processes written in Tcl, you can run them on your web server via the Common gateway Interface, possibly with a bit of topping and tailing to read data from a form ...

Tcl - nice and nasty
Tcl is a lovely engineers language ... but goodness you can do some nasty things with it, and write some unmaintainable code. set count 1 foreach type {if while} {   $type {$count < 5} { ...

Handling nasty characters - Perl, PHP, Python, Tcl, Lua
Are your writing or maintaining a web based application that uses forms? If so, you have better be aware of some of the nasty characters that are around! The < character, when echoed back from a ...

Tcl/Tk - why does the canvas widget use a display list?
"Tcl/Tk uses a display list when you draw on a canvas widget." OK - so what does that really mean? With most of the languages that we teach, any graphics you draw go straight into a frame buffer of a ...

Matching disparate referencing systems (MediaWiki, PHP, also Tcl)
Yes, we are Well House CONSULTANTS and do a bit of specialist coding ... I have a requirement on my plate at present to write a piece of code for a customer that recognises cross reference codes ...

PHP - getclass v instanceof
It should be very rare that you want to say "what type of object is this?" in PHP - or in any OO language; that's because with a correctly implemented class structure, you should have polymorphic ...

Error: Cant read xxxxx: no such variable (in Tcl Tk)
If you set a Tcl (Tcl/Tk) variable within a proc, or within the callback command of a widget, that variable does not exist at run time until you have run the proc or callback procedure, or until you ...


You can Add a comment or ranking to this page

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