DMD 0.148 - scope guard

Chris Sauls ibisbasenji at gmail.com
Sun Feb 26 14:58:39 PST 2006


Cris wrote:
> Tom S wrote:
>> Cris wrote:
>>>
>>> Yes I agree with Kyle but not to overuse simple keywords, what about 
>>> something like "onSuccess:", "onFailure:", etc...
>> Then it would look like an ordinary label, wouldn't it ? That's a 
>> different thing.
> Are there labels in D?

Yup.  As free labels and as block statement labels.

# import std.stdio;
# void main () {
#   goto L_bar;
#
# L_foo:
#   writefln("foo"c);
#   goto L_exit;
#
# L_bar:
#   writefln("bar"c);
#   goto L_foo;
#
# L_exit:
# }

-- Chris Nicholson-Sauls



More information about the Digitalmars-d mailing list