goto skips declaration of variable
ketmar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Aug 18 10:47:12 PDT 2014
On Mon, 18 Aug 2014 13:51:12 +0000
nrgyzer via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com>
wrote:
> When I try to compile this sample application I'm getting the
> following error:
>
> sample.d(7): Error: goto skips declaration of variable
> sample.main.__ctmp1344 at sample.d(9)
it's compiler bug i believe.
but why do you need gotos at the first place? i'm not saying that "you
must avoid gotos at all costs!", but D has some nice features like
scope(exit), scope(success), scope(failure) and nested functions, which
can render gotos unnecessary in many cases (and make code cleaner).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20140818/da822cd6/attachment.sig>
More information about the Digitalmars-d-learn
mailing list