This comes up every so often on comp.lang.tcl: Chris Nelson wrote: > For example, whereas I might write C like: > > struct s { > int foo > char bar > float grill > } > > s.foo = 1; > s.bar = 'c'; > s.grill = 3.14159; proc struct { name thingys } { foreach thing $thingys { uplevel set $name.$thing \[ list \] } } struct s { foo bar grill } set s.foo 1 set s.bar c set s.grill 3.14159 Of course, you probably dont just want to init the "struct" to nulls, but to reasonable values: proc struct { name thingys } { foreach { key value } $thingys { uplevel set $name.$key $value } } struct s { foo 1 bar c grill 3.14159 } Tcl has no types, but if you want to create a typing convention and then use types in your struct it is only a matter of adding ''type'' to the foreach that now iterates ''key'' and ''value'' over ''$thingys''. '''-PSE'''