Article View: comp.std.c
Article #3376Re: How to eliminate GOTO?
From: halasz
Date: Fri, 25 Aug 1995 03:39
Date: Fri, 25 Aug 1995 03:39
27 lines
1412 bytes
1412 bytes
halasz@caip.rutgers.edu wrote:
:
: iLoop: for(i=0;i<10;i++)
: for(j=0;j<10;j++){
: /* some other code here to set condition */
: if(condition) break iLoop;
: }
In article <41gnhu$qfj@eri2.erinet.com>, jab@PROBLEM_WITH_YOUR_MAIL_GATEWAY_FILE (Jerone A. Bowers) writes
>
> for(i=0;i<10;i++)
> for(j=0;j<10;j++)
> {
> /* some other code here to set condition */
> if(condition) goto iLoop;
> }
> iLoop:
> .....
>
> Pretty much the same thing are they not?
Not from the viewpoint of program-upkeep: a label for "break" is valid
nowhere but before the loop or "switch" that has "break" within it.
And if the label is syntacticlie different from that which "goto" uzes,
the sight of a "break"/"continue" label lets the programmer look onlie
within the construct. In anie case, control passes onlie to after the
loop or "switch", and "goto" can pass control aniewhither
Technical Details
Message-ID:
<41jglm$mvb@caip.rutgers.edu>Path:
arc1-ca.pugleaf.net!caip.rutgers.edu!not-for-mailReferences:
<3vn1ht$kj8@martha.utk.edu> <41cke4$gtd@sparcserver.lrz-muenchen.de> <41gnhu$qfj@eri2.erinet.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!caip.rutgers.edu!not-for-mail From: halasz@caip.rutgers.edu Newsgroups: comp.std.c,comp.lang.c Subject: Re: How to eliminate GOTO? Date: 24 Aug 1995 23:39:34 -0400 Organization: Rutgers University Message-ID: <41jglm$mvb@caip.rutgers.edu> References: <3vn1ht$kj8@martha.utk.edu> <41cke4$gtd@sparcserver.lrz-muenchen.de> <41gnhu$qfj@eri2.erinet.com> NNTP-Posting-Host: caip.rutgers.edu