www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - label scope

reply James <james gmail.com> writes:
im trying something like

labelx: foreach(...) {

   foreach(..) {
     continue labelx;
   }
}

just curious, how is the scope of label name. i mean does labelx can be called
outside this function or not, so that i wont mess up in naming stuffs
Nov 02 2008
parent reply "Jarrett Billingsley" <jarrett.billingsley gmail.com> writes:
On Sun, Nov 2, 2008 at 11:22 PM, James <james gmail.com> wrote:
 im trying something like

 labelx: foreach(...) {

   foreach(..) {
     continue labelx;
   }
 }

 just curious, how is the scope of label name. i mean does labelx can be called
outside this function or not, so that i wont mess up in naming stuffs

No, labels are local to the function.
Nov 02 2008
parent james <james gmail.com> writes:
ok thanks alot.
Nov 02 2008