3 ms·
To add to the confusion what TCL calls arrays are not what other languages call arrays. The above syntax is needed for lists, not arrays. If you want to incre
by ithkuil 5y ago
To add to the confusion what TCL calls arrays are not what other languages call arrays.
The above syntax is needed for lists, not arrays.
If you want to increment a value in a TCL array all you need to do is:
incr myArray($i)
However that array is basically a dictionary, a hash map of (integer in this example) keys to values.
- auxym 5y agoTCL associative arrays are hash maps that have to be global. They are definitely one of the worst part of the language. Most people use dicts on modern TCL instead.