why scope(success)?
Sean Kelly
sean at f4.ca
Wed May 10 15:13:37 PDT 2006
Chris Miller wrote:
>
> This gives me an idea, how about if there was scope(none) that is just
> like a regular block, but doesn't create a new scope. This would be for
> when you only need to group statements but have no interest in a new scope.
>
> void foo()
> {
> if(a) scope(none) { stuff(); scope(success) bar(); }
> baz();
> }
>
> bar() would execute after baz();
It's a nasty hack, but:
if(!a) goto blah;
scope(success) a.foo();
blah:
...
Sean
More information about the Digitalmars-d
mailing list