DMD 0.148 - scope guard
Walter Bright
newshound at digitalmars.com
Sat Feb 25 19:51:45 PST 2006
"Derek Parnell" <derek at psych.ward> wrote in message
news:op.s5j942tp6b8z09 at ginger.vic.bigpond.net.au...
> Wow! I know of one other language that (almost) implements this.
Which one?
> Does 'scope' mean any type scope, and not just function scope? For
> example, can it include module scope? ... if/while/for/foreach scope? ...
> block scope?
Yes.
> And I assume 'statement' can be a block of statements ...
>
> on_exit_scope { stmt1; stmt2; ... stmtn;}
Yup. (The C++ macro version is limited to a single function call with
argument.)
More information about the Digitalmars-d
mailing list