Re: are there implementation reasons for not providing a break statement in an imperative language?

August Karlstrom <fusionfile@gmail.com>
Tue, 18 Jan 2011 16:00:13 +0100

          From comp.compilers

Related articles
are there implementation reasons for not providing a break statement i noitalmost@cox.net (noitalmost) (2011-01-13)
Re: are there implementation reasons for not providing a break stateme DrDiettrich1@aol.com (Hans-Peter Diettrich) (2011-01-14)
Re: are there implementation reasons for not providing a break stateme fusionfile@gmail.com (August Karlstrom) (2011-01-14)
Re: are there implementation reasons for not providing a break stateme anton@mips.complang.tuwien.ac.at (2011-01-15)
Re: are there implementation reasons for not providing a break stateme bc@freeuk.com (BartC) (2011-01-16)
Re: are there implementation reasons for not providing a break stateme Pidgeot18@verizon.net (Joshua Cranmer) (2011-01-16)
Re: are there implementation reasons for not providing a break stateme richard@cogsci.ed.ac.uk (2011-01-18)
Re: are there implementation reasons for not providing a break stateme fusionfile@gmail.com (August Karlstrom) (2011-01-18)
Re: are there implementation reasons for not providing a break stateme fusionfile@gmail.com (August Karlstrom) (2011-01-18)
Re: are there implementation reasons for not providing a break stateme richard@cogsci.ed.ac.uk (2011-01-19)
Re: are there implementation reasons for not providing a break stateme bc@freeuk.com (Bartc) (2011-01-20)
Re: are there implementation reasons for not providing a break stateme pdjpurchase@googlemail.com (1Z) (2011-02-13)
Re: are there implementation reasons for not providing a break stateme thomas.mertes@gmx.at (tm) (2011-02-17)
Re: are there implementation reasons for not providing a break stateme idbaxter@semdesigns.com (Ira Baxter) (2011-03-07)
[2 later articles]
| List of all articles for this month |

From: August Karlstrom <fusionfile@gmail.com>
Newsgroups: comp.compilers
Date: Tue, 18 Jan 2011 16:00:13 +0100
Organization: A noiseless patient Spider
References: 11-01-043 11-01-064 11-01-065
Keywords: syntax, design, comment
Posted-Date: 18 Jan 2011 10:29:05 EST

On 2011-01-16 21:09, Joshua Cranmer wrote:
> That said, there are other language constructs that I would like to see
> more commonly introduced, particularly the ability to go to different
> blocks if a while loop terminates early or not (think looking for an
> element in an array, and doing something only if you find one).


Do you think such a construct could make your example significantly
shorter or clearer than this?


i = 0;
while ((i < n) & (a[i] != x)) { /*search for x in a*/
i++;
}
if (i < n) { /*found*/
...
}




August


--
The competent programmer is fully aware of the limited size of his own
skull. He therefore approaches his task with full humility, and avoids
clever tricks like the plague. --Edsger Dijkstra
[Make the termination test more complex, and it gets pretty ugly. But
this is awfully close to arguing about where the semicolon goes. As
the prior message noted, break statements don't make loop analysis any
harder. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.