Tcl (was Re: [oclug] UNIX philosophy (was Re: vim rulez...))
Michael P. Soulier
msoulier at storm.ca
Thu Apr 19 08:23:25 EDT 2001
On Wed, Apr 18, 2001 at 10:09:17PM -0400, Jon Earle wrote:
> Last version of Tcl/Tk I used was 8.0. It didn't have a real array
> construct (it's version of "arrays" is like C structs) and Tk had no table
> widget. This meant building tables of data using Tcl/Tk was _really_
> Has this changed in recent versions?
Not that I know of. Arrays are done like in Awk really.
set array1[$index] = $value
set array2[$index1_$index2] = $value
They're associative arrays, and by putting two values together you can
simulate multi-dimensional arrays. It's a little ugly but it works.
And yes, Tcl has "caught up" so to speak with Perl and Python in the
bytecode arena, so it's faster now. It's a nice language overall. I'm told
that incrTcl is pretty much like Java in its syntax. I'm primarily interested
in Tcl purely for Expect though.
Michael P. Soulier <msoulier at storm.ca>
"With sufficient thrust, pigs fly just fine. However, this is not necessarily a
good idea. It is hard to be sure where they are going to land, and it could be
dangerous sitting under them as they fly overhead." -- RFC 1925
More information about the OCLUG