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 provided are really megacommands that wrap a whole lot of others up in a single group.
Let's take string handling as an example. There are
scan and
format and
append commands available, and there's what I'll call a megacommand called
string which takes a second parameter calling up a particular subcommand - something like
string match or
string length or
string trim. Other megacommands include
info and
file and
clock.
Tcl is a library to be built with other proprietory code, and sometimes that other code can be included as additional Tcl commands. I'm running a Tcl course this week, for a customer who's using a Tcl that's been built by Agilent for use with some of their equipment ... and the sample code Dave has with him includes lots of calls to
AgtInvoke.
Now I've never come across AgtInvoke before, but looking at the syntax of the code, it's very clearly a sommand with at least one level of subcommand - and this drives the whole Agilent-specific end of the code. It's a very neat way of doing things. Of course, I'm not able - as a generalist - to be able so say exactly what each AgtInvoke does - but I can (and have) guided my customer through the details of the Syntax calls to at, and shown him how - very neatly - the Agilent folks have extended Tcl by adding just the one extra command.
(written 2007-07-26 01:31:46)
Associated topics are indexed under
T214 - Tcl/Tk - Other Facilities in Tcl
Some other Articles
Latercomer to the technologyWest Wilts - no longer Wet Wilts - showThe Gdansk fireballWest Wilts ShowAgtInvoke - a command to drive Agilent Tcl software extensionsOn flooding in Wiltshire and elsewhere in the West of EnglandIncident in MelkshamRadio coverage for railway issuesMelksham or Weymouth? Meal or day out?Behind closed doors?