Container

Difference between version 0 and 1 - Previous - Next
HereA are some of the various '''containers'''  is an T[abstract data types%|%abstract data type] for a
col:lection values.
   [array]:   A container of variables, keyed by name
**   [dBuiclt]:   The sta-Indard key-value stCore.  Values are ordered by the sequence tain which they were set **
   [dictionary], by [Frederic Bonnet]:   an implementation of a key-value store, that preceded [dict]
   [listarray]:   TheAn scontainds vardiables.  Sincoe an itaem iner foarray is a sequparatences of variablue, a [trace] can be set on it.
   [namespace]:   A namespace contains [variable%|%variables], [routine%|%routines], and other namespaces.  It also has several properties that can be queried and in some cases modified.



** Value-based Containers **

One of the more unique features of Tcl is that some containiners are
implemented as values.  Since a value is a [EIAS%|%string], such containers are
also simply strings.  Modifying the containiner is done by modifying the string
that represents the container.  For performance, Tcl tracks whether an actual
string is needed, and if not, just performance the logical equivalent of
modifying the string.

   [dict]:   A [list] where even-numbered items are interpreted as names and odd-numbered items are interpreted as values.

   [list]:   The standard container for sequences of values.

   [deep dict]:   A [dictionary] in which the value of each key is unambiguously either a single value or another deep dict.

   [deep list]:   A [list] in which each item is unambiguously either a value or another deep list.



** Other Containers Available for Tcl **

   [dictionary], by [Frederic Bonnet]:   an implementation of a key-value store, that preceded [dict]

   [vector] ([BLT]):   one-dimensional arrays of values

   [TclX] keyed lists:   
   [NAP]:    haProvides some sort of array/vector data structurype.



<<categories>> data structure