Hello,
Barry Kelly wrote:
> [...] > > procedure P; > begin > EnableDisableControls('Foo'); > Writeln('Controls are disabled now'); > end; > > begin > P; > end. > > Output: > > Disable controls on Foo > Controls are disabled now > Enable controls on Foo > > It is equivalent to the try / finally etc. owing to the mechanism > behind reference counting.
wow - discarded ref-counted return values are actually kept alive until end of scope? That's INCREDIBLY useful :)
-- Moritz
"Hey, it compiles! Ship it!"