A dictionary is an arrangement for mapping values to keys. The syntax for the conventional
dictionary is

dict set dictname key value
# or
dict create dictname key1 value1 key2 value2 .. keyn valuen

Example:

dict set thicknesses t1 0.1
puts $thicknesses
dict set thicknesses t2 0.2
puts $thicknesses
set thicknesses [dict create t1 0.1 t2 0.2]
puts $thicknesses

Result:

t1 0.1
t1 0.1 t2 0.2
t1 0.1 t2 0.2

Discover more from Tips and Hints for Aerospace Engineers

Subscribe now to keep reading and get access to the full archive.

Continue reading