| |||||||||||
| |||||||||||
Arrays in Tcl
![]()
To a traditional computer scientist (if you can have such a person), an array is a series of equally sized variables,
sequentially placed in computer memory and accesses using an index number starting at 0 or 1. Such an array is limited
in that the elements are of a fixed size and in that it cannot easily have extra elements added later. The word "array"
in Tcl is used to describe a collection variable that holds a series of values by an index (key), but with some
differences that add extra facilities and take nothing useful away; array keys are strings rather than numbers (logical,
since all variables contain strings), arrays can be extended with extra elements dynamically, and each individual
element may contain a different length string. Technically, they're not really arrays but linked lists but the word
"array" is used as that's what they look like at first ... and also because the word "list" was already used up for
something else in Tcl when Tcl arrays were added.
Show a large image More about arrays in Tcl Associated topic - Tcl/Tk - Arrays |
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho | |||||||||||