On Mon, 2002-11-11 at 10:22, Jeff Hobbs wrote:
> > Tcl arrays are associative.  Tcl has pretty much 3 data structures:
> >
> >         - scalars
> >         - lists
> >         - arrays (which are associative)
> >
> > The trick is that a list is really just a scalar with whitespace between
> > the elements, unless the element is enclosed by braces, so there's really
> > only two.
>
> Woah, that last part isn't true at all, and is a common misconception
> that leads people to think Tcl isn't up-to-snuff, which isn't true.
>
> Lists are preserved in Tcl as arrays of Tcl_Obj's.  If I do the following:
>
>         proc makeList {size} {
>                 set output ""

Is there any difference in initializing output to list at first, or is
there no difference. IOW, should I initialize 'output' to a list object,
or does 'set output ""' just create an untyped object?

   set output [list]  <--- does this have any affect?

thanks,

    --brett


--
Brett Schwarz
brett_schwarz AT yahoo.com

Reply via email to