set w [open 1.txt w+]
foreach a [info var] {
if { [llength [array name $a]]==0 } {
puts $w $a:[set $a]
}
}
foreach a [info var] {
if { [llength [array name $a]]!=0 } {
puts $a
foreach b [array name $a] {
puts $w ${a}($b):[set ${a}($b)]
}
}
}
close $w
时间: 2024-12-17 19:35:42