Re: if else else
- From: Uwe Klein <uwe_klein_habertwedt@xxxxxxxxxxx>
- Date: Tue, 30 Jan 2007 13:53:17 +0100
The thing fredderic had in mind
is imho a thing not realy connected to if or switch.
Essentially a method to _unwind_ some actions is required.
Now that is easily done using one of tcls main feature:
the dualism between data and code.
set unwind {}
if {![catch {set fd [ open $filename $op]} cerr]} {
append unwind "close $fd"
} else {
eval $unwind
exit
}
# continue with stacking operations
# eval $unwind on error
uwe
.
- References:
- if else else
- From: Fredderic
- Re: if else else
- From: Neil Madden
- if else else
- Prev by Date: teapot package: what is?
- Next by Date: Re: Tcl bytecode
- Previous by thread: Re: if else else
- Next by thread: Re: if else else
- Index(es):
Relevant Pages
|