Posted to tcl by gwlester at Sat Jan 27 18:59:53 GMT 2018view raw
- proc GetInfo {inList target} {
- set found no
- set results {}
- foreach pair $inList {
- lassign $pair type value
- if {$found && $type ne "LBL"} {
- lappend results $pair
- } elseif {$found && $type eq "LBL"} {
- return $results
- } elseif {!$found && $type eq "LBL"} {
- set found yes
- lappend results $pair
- }
- }
- return $results
- }