例如在这个字典中:
如何更改名字、姓氏、街道、城市和电话字段的值?我试过这样:
dict for {id info} $employeeInfo {
puts "Employee #[incr i]: $id"
dict with info {
puts " Name: $forenames $surname"
puts " Address: $street, $city"
puts " Telephone: $phone"
set [dict get $employeeInfo $id phone] 2341
puts " New Telephone: $phone"
}
}
电话通过以下方式设置了新值:
set [dict get $employeeInfo $id phone] 12345
它不起作用。这样做的正确方法是什么?