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.

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

Square Bracket protection in Tcl
I was writing some string match examples in Tcl yesterday - and had the need to explicitly match square brackets within my string. But I couldn't just write the square brackets into the match string ...

Tcl - append v lappend v concat
Should you use append, lappend or even concat to add to variable in Tcl? append puts one string directly on the end of another, without adding any extra characters beyond those in the incoming ...

Tcl - using [] or {} for conditions in an if (and while)
In Tcl, the use of square brackets tells the interpreter to "do this first" whereas curly braces are a request to defer execution of a block - perhaps suppressing it completely as in the action on an ...

Tk locks up - 100% c.p.u. on a simple program (Tcl, Perl, Python)
Fighting packs and grids - Tk under Tcl, Perl, Python You'll use pack OR grid to place components into your frame in a Tcl/Tk application. You may use both pack and grid within the same program, but ...

Handling Binary data in Tcl (with a note on C)
In Tcl, all variables are held as strings, and most of the commands will split / divide strings at new line or space characters by default. However, there are a few commands that do NOT make that ...

Expanding a grid - Tcl/Tk
Have you ever tried to fill or expand a grid in Tcl/Tk to fill the available space left by wider or taller widgets to the die, or when the window expands, and got results like those I have posted ...

Stable sorting - Tcl, Perl and others
Have you come across a STABLE sort? A Stable sort is one in which all the incoming elements which evaluate to an equal value when tested for sorting purposes remain in the same order in the output as ...

Tktable - Laying out data in a matrix - Tcl/Tk
There's a very common requirement to tabulate data within a GUI, but neither Java (in awt) or Tcl (in Tk) had the facility built in from "day 1". In Java, you now have Jtable within Swing ([example]) ...

Stringing together Tcl scripts
If you have a series of Tcl scripts that you want to run in a sequence, you can call all of them up in a master script using a series of source commands. This command switches input from the current ...

AgtInvoke - a command to drive Agilent Tcl software extensions
In Tcl, there's a lot of commands available already - and there would be a lot more if separate commands were provided for each operation you might wish to perform. So some of the commands that are ...

Changes in advertising cut lines / Buscot / Tcl course
Please look at the above for at least 2 minutes as it probably won't appear again in this paper for six months So says the last line on the bottom of an old advert displayed on the wall of the Village ...

Installing Tcl and Expect on Solaris 10 - a checklist
Hot off the presses from the last couple of days - a check list (and a couple of "Gotcha" notes) concerning the installation of Tcl and Expect on a Solaris 10 system, compiling from scratch were ...

Buffering output - why it is done and issues raised in Tcl, Perl, Python and PHP
When you go to board a plane at Heathrow, do the ground staff admit the passengers one at a time, ensuring that each is seated before the next boards, and sealing and re-opening the main doors ...

Tcl training - often for a larger group
There's a different 'metric' for courses in the different languages we teach - PHP programmers come in ones and twos much of the time, but almost all of the Tcl training we do is for larger groups ...

Running external processes in Tcl and Tcl/Tk
If you want to run external processes from a Tcl based program (Tcl, Tcl/Tk, expect), there are various ways of doing it. Firstly, the whole purpose of the Expect extension is to allow you to control ...

Converting between Hex and Decimal in Tcl
Tcl is much used in the semiconductor industry, so there's a common requirement to use it to convert values back and forth between hexadecimal (base 16) and decimal (base 10). Easily done! The ...

Tcl - lappend v concat
In Tcl, you can use the lappend command to add items on to a list, but it doesn't always do exactly what you wish it to. Let's say that I've got two lists - the first containing the early courses of ...



See also:

© WELL HOUSE CONSULTANTS LTD., 2008: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 0800 043 8225 or 01225 708225 • FAX: 0845 8382 405 or 01225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho