Article View: comp.lang.c.moderated
Article #2067Re: use of the break statement
From: Konrad Schwarz
Date: Sun, 25 Feb 1996 17:57
Date: Sun, 25 Feb 1996 17:57
56 lines
3090 bytes
3090 bytes
In article <4gfcl7$2ls@solutions.solon.com>, Stephen Frankel <166.20.17.125@uunet.uu.net> writes:
|> C programing standard developed for the program). One restriction
|> that the standard enforces is "break statements may only be used
|> as part of switch/case statements. What is the current "software
|> engineering" viewpoint on the use of the break statement. Any
The programming language Ada83, has the ``exit'' statement, which is a more
powerful form of ``break,'' since it allows jumps out of nested loops.
Loops can be named, ``exit name;'' continues with the statement following
the named loop.
To quote from section 1.3, ``Design Goals and Sources,'' of the Ada
language standard:
1 Ada was designed with three overriding concerns: program
reliability and maintenance, programming as a human
activity, and efficiency.
2 The need for languages that promote reliability and simplify
maintenance is well established. Hence emphasis was
placed on program readability over ease of writing. [...]
Furthermore,
error-prone notations have been avoided, and the syntax
of the language avoids the use of encoded forms in favor of
more English-like constructs. [...]
3 Concern for the human programmer was also stressed
during the design. Above all, an attempt was made
to keep the language as small as possible, given the
ambitious nature of the application domain. We have
attempted to cover this domain with a small number
of underlying concepts integrated in a consistent and
systematic way. Nevertheless we have tried to avoid the
pitfalls of excessive involution, and in the constant search
for simpler designs we have tried to provide language
constructs that correspond intuitively to what the users will
normally expect.
Section 1. Introduction:
1 Ada is a programming language designed in accordance
with requirements defined by the United States Department
of Defense: the so-called Steelman requirements. Overall,
these requirements call for a language with considerable
expressive power covering a wide application domain.
As a result, the language includes facilities offered by
classical languages such as Pascal as well as facilities
often found only in specialized languages. Thus the
language is a modern algorithmic language with the
usual control structures, and with the ability to define types
and subprograms.
Konrad Schwarz
(If only ISO would make the C standard available electronically!)
Technical Details
Message-ID:
<4gq7ti$oil@solutions.solon.com>Path:
arc1-ca.pugleaf.net!solon.com!not-for-mailReferences:
<4gfcl7$2ls@solutions.solon.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail From: schwarz@a3.complang.tuwien.ac.at (Konrad Schwarz) Newsgroups: comp.lang.c.moderated Subject: Re: use of the break statement Date: 25 Feb 1996 11:57:06 -0600 Organization: TU Wien Sender: clc@solutions.solon.com Approved: clc@solutions.solon.com Message-ID: <4gq7ti$oil@solutions.solon.com> References: <4gfcl7$2ls@solutions.solon.com> NNTP-Posting-Host: solutions.solon.com