pu daily and p hourly
Archive - Originally posted on "The Horse's Mouth" - 2005-06-30 15:53:35 - Graham EllisTcl is a command based language - everything you do uses a command that starts with a command word such as puts to output information or set to assign a value to a variable. The while command (yes, it really is a command) lets you define a block of code that's to be run repeatedly while a condition is true, and so on.
As well as storing Tcl programs in a file, you can type Tcl commands in at an interactive prompt ... and if you do so, you're allowed to shorten the name of your commands provided they remain non-ambiguous. This is why Tcl will let you pu but not p ....
earth-wind-and-fire:~ grahamellis$ tclsh
% pu daily
daily
% p hourly
ambiguous command name "p": package pid proc puts pwd
% exit
earth-wind-and-fire:~ grahamellis$
Please excuse the - err - lavatorial sense of humour this example shows. It came up (I confess I originated it) on a Tcl Course that I've just completed in Scotland.