The syntax for checking if a key exists in dict is
[dict exists $dictname key1]
Example:
set thicknesses [dict create t1 0.1 t2 0.2 t3 0.25] set result [dict exists $thicknesses t3] puts $result
Result:
1
Jan 4, 2022 | tcl | 0 comments
The syntax for checking if a key exists in dict is
[dict exists $dictname key1]
Example:
set thicknesses [dict create t1 0.1 t2 0.2 t3 0.25] set result [dict exists $thicknesses t3] puts $result
Result:
1
Subscribe now to keep reading and get access to the full archive.
Recent Comments