Re: Exit(n) vs. goto

new topic     » goto parent     » topic index » view thread      » older message » newer message

18/02/2002 11:23:30 AM, mistertrik at hotmail.com wrote:

>
>>(I'd also like to get rid of this silly 'end for', 'end >while', 'end
>>procedure', 'end function' stuff. Just a maintenance >headache and serves 
>>no
>>useful purpose, but that's another issue blink )
>
>Have you done C programming? 

I've been programming in C since 1979.

>Do you know how ANNOYING trying to chase down { 
>and } characters are in a deeply nested for & if loop?

Too bloody right I do. Especially when they are optional!

   if (cond1)
       if (cond2)
           RtnA;
       else
           RtnB;
   
RtnB gets executed when NOT cond1, and cond2 has nothing to do with it! Which is
most confusing.

>Just for the record, I have no problems with constructing for and if loops 
>3-4 levels deep, because as long as it is indented properly, it is very easy 
>to understand.

I too learned the value of consistant indentation sytle with C. I also now
always use braces with
if/for/while statements.

   if (cond1)
   {
       if (cond2)
       {
           RtnA;
       };
   }
   else
   {
      RtnB;
   }

---------
Cheers,
Derek Parnell

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu