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.

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 ...

What is running on your network? (tcl and expect)
Earlier this week, I gave a much-tailored Tcl course, with a strong helping of expect. Expect adds three major extra commands to Tcl - spawn to start a new process under the control of the running ...

Global - Tcl, PHP, Python
PHP, Python, Tcl and a number of other languages have a global keyword. And it's a misnomer in most (if not all) cases. To the un-initiated, "Global" means "worldwide" or "shared all around". So ...

Calling procs in Tcl and how it compares to Perl
In languages such as Java, you must call your named blocks of code (methods) with the correct number and type of parameters, but in Perl you may call them with as many or as few parameters as you like ...

Cambidge - Tcl, Expect and Perl courses
By an amazing co-incidence, I'm in Cambridge this week ... running two 2.5 day Tcl and Expect courses, then back just across the road next week running two 2 day Perl introduction courses of the ...

Advanced Python, Perl, PHP and Tcl training courses / classes
This item is adapted from an answer that I have just written by email - but the question / conundrum as to what to do with fractured advanced training requirements is a common one, so the answer is ...

Tcl - learning how to use namespaces, packages and libraries together
Tcl supports both packages (which allow code to be loaded from libraries at run time) and namespaces (which allow for procs and variables to be grouped together to allow you to avoid conflicts as you ...

Object Oriented Tcl
Object Oriented Tcl ([incr-Tcl]) is darned good - but it's only a requirement in a small proportion of the Tcl Training Courses that I give. So it was with real pleasure that I spent some time ...

Tcl/Tk - updating your display while tasks are running
Let me make two statements: 1. When you are popping up a new window from your program, the very last thing you want to see happen is for the window to gradually appear, with bits of it being resized ...

Using Tcl/Tk resource files for flexible applications
If you're looking to write a Tcl/Tk application that can be flexibly configured, don't forget to use named resources. Here are two displays from the same program: So - how did I get the difference ...

Making a variable dynamically visible in a Tcl/Tk GUI
set bill "and Ben" label .about -textvariable bill button .first -text "First" -command {set bill Bradshaw} button .second -text "Second" -command {set bill Bailey} button .done -text quit -command ...

Cliff Lift simulator- Lynton to Lynmouth - in Tcl/Tk
In Tk, you can use the variable option to a slider and the textvariable option to a label or button (or some other widgets) to 'project' the value of a variable onto the display - either changing the ...

fill and expand on Tcl/Tk pack command
pack .this .that -expand true -fill both Why are there two different options expand and fill? Are they both needed? expand causes a widget to expand to fill the space available as a window is ...

Curley brackets v double quotes - Tcl, Tk, Expect
In Tcl, both Curley braces and double quotes can be used to hold a block of program or data together as a single unit / parameter ... but there are differences ... a) Curley braces can stretch over a ...

stdout v stderr (Tcl, Perl, Shell)
When you're programming, you shouldn't write code to read directly from the keyboard and write to the screen .... what if you want to have your program read from or write to a file sometimes? ...

Perl, PHP, Python, Tcl, Linux, MySQL, Ruby courses ...
What's this list got in common (apart from all being countries?) BelgiumEnglandFinlandFranceGermanyGuernseyIrelandNetherlandsNorwaySaudi ArabiaScotlandSloveniaSwedenUSAWales They're all countries ...

Linux, PHP, Tcl, Ruby, C, C++ - last minute training course availability
Here's a schedule of our public courses from now until Christmas. Linux Basics - 19th November Linux Administration - 20th November Linux Web Server - 22nd and 23rd November Technology for PHP - 26th ...

Arrays in Tcl - a demonstration
# Array in Tcl   set town(Wycombe) 120000 set town(Marlow) 32567 set town(Amersham) 17000 set town(Melksham) 24000 set town(1) xxxxxx set town(1.) yyyyyyy   # Note that you CAN use numbers ...

Buffering up in Tcl - the empty coke can comparison
A comment on buffering in Tcl .... if {1 == 0} { When you finish drinking a can of Coke, you don't call your local recycling plant up straight away and have them send a truck around to collect the ...

Sparse and Greedy matching - Tcl 8.4
Problem Analysis Once you have done a sparse or greedy count, all your following counts will also be sparse or greedy - this is a well documented bug in Tcl 8.4! Reminder ... .* is a greedy match - ...

Tcl / regsub - changing a string and using interesting bits
Regexp matches a string to a regular expression, and regsub goes one further in that it replaces the found string with something else, saving the transformed output into a new variable. But what if I ...

Reading from another process in Tcl (pipes and sockets)
If you want to read from another process on the same system that you're running your code on in Tcl can be done using a pipe - you can use open with the command name instead of the file name, ...

Sorting in Tcl - lists and arrays
Tcl's lsort command lets you sort a list - and that can be a list of the keys of an array. You can't sort the array, but once you have the list of keys you can sort that and use it to iterate through ...

Tcl - global, upvar and uplevel.
In Tcl, variables are "scoped" to the procedure in which they're used. That's a sensible default, since you want to be able to write main applications without the risk of interfering with variables ...


You can Add a comment or ranking to this page

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