Re: Requesting advice how to clean up C code for validating string represents integer
rem642b@yahoo.c om (robert maas, see http://tinyurl.com/uh3t) writes:
>
Maybe. I'm still wondering what "region" means in the definition.
It's an ordinary English word for which the standard provides no
specialized definition. Do you also wonder about the meanings of
"of", "data", and "storage"? The standard does not attempt to be an
unabridged dictionary.
If the standard's definition of "object":
region of data storage in the execution environment, the contents
of which can represent values
confuses you, then this is the right place to ask for clarification.
I suspect that producing a definition for "region" won't make it any
clearer; any such definition must use other words, which themselves
need to be defined.
>
In specifying behaviour of C programs and the syntax that generates
that behaviour, but:
>
>
Not necessarily so. I don't quite see how the ANSI/ISO standard
requires us to use terminology in any particular way when
discussing C in any context other than further work on the standard
itself.
The standard does not *require* us to use its terminology. In fact,
the standard doesn't require anybody to do anything. It's effectively
a contract between implementers and users, but no implementer or user
is *required* to accept it. You can write a non-conforming C compiler
if you like, and you can write non-portable C programs if you like;
nobody is going to arrest or sue you for doing so, unless perhaps you
fraudulently claim comformance. (There may be some externally imposed
requirements to conform to the standard; if so, it's up to you to meet
those requirements or not.)
*However*, this newsgroup, by general consensus of (most of) the
participants, discusses the C programming language as defined by
(various versions of) the C standard, and we find that using terms as
the standard defines them makes communication much easier.
If you choose to use terms defined by the standard in ways that
conflict with the way the standard defines them, nobody is going to
come pounding on your door in the middle of the night. You're just
going to have difficulty communicating in this newsgroup.
If you use a term that's defined by the standard, I (and probably
others) will assume that you meant to use it in accordance with the
way the standard defines it. If your usage is clearly inconsistent
with that, I (and probably others) will probably point it out as an
error on your part -- or we might not bother. That's the reality
here. Nobody is asking you to agree that it's a good thing; I'm
simply informing you of the way things are. You can deal with it, or
you can find yourself in a lot of killfiles -- because nobody requires
*us* to communicate with *you* if you're unwilling to follow a
reasonable set of guidelines.
You're perfectly free to use the term "object", for example, in its
OOP sense; if you do so, I advise you to make it explicit that you're
using it that way. It's really not difficult.
[snip]
--
Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
rem642b@yahoo.c om (robert maas, see http://tinyurl.com/uh3t) writes:
>From: "Malcolm McLean" <regniz...@btin ternet.com>
>In the C standard the term "object" has a very specific
>definition. When most C programmers use the term "object" they
>are not using it in this sense, probably even when specifically
>discussing C.
>In the C standard the term "object" has a very specific
>definition. When most C programmers use the term "object" they
>are not using it in this sense, probably even when specifically
>discussing C.
Maybe. I'm still wondering what "region" means in the definition.
specialized definition. Do you also wonder about the meanings of
"of", "data", and "storage"? The standard does not attempt to be an
unabridged dictionary.
If the standard's definition of "object":
region of data storage in the execution environment, the contents
of which can represent values
confuses you, then this is the right place to ask for clarification.
I suspect that producing a definition for "region" won't make it any
clearer; any such definition must use other words, which themselves
need to be defined.
>The standard is an important document,
In specifying behaviour of C programs and the syntax that generates
that behaviour, but:
>
>so we can hardly hold that it is wrong to use its terminology,
Not necessarily so. I don't quite see how the ANSI/ISO standard
requires us to use terminology in any particular way when
discussing C in any context other than further work on the standard
itself.
the standard doesn't require anybody to do anything. It's effectively
a contract between implementers and users, but no implementer or user
is *required* to accept it. You can write a non-conforming C compiler
if you like, and you can write non-portable C programs if you like;
nobody is going to arrest or sue you for doing so, unless perhaps you
fraudulently claim comformance. (There may be some externally imposed
requirements to conform to the standard; if so, it's up to you to meet
those requirements or not.)
*However*, this newsgroup, by general consensus of (most of) the
participants, discusses the C programming language as defined by
(various versions of) the C standard, and we find that using terms as
the standard defines them makes communication much easier.
If you choose to use terms defined by the standard in ways that
conflict with the way the standard defines them, nobody is going to
come pounding on your door in the middle of the night. You're just
going to have difficulty communicating in this newsgroup.
If you use a term that's defined by the standard, I (and probably
others) will assume that you meant to use it in accordance with the
way the standard defines it. If your usage is clearly inconsistent
with that, I (and probably others) will probably point it out as an
error on your part -- or we might not bother. That's the reality
here. Nobody is asking you to agree that it's a good thing; I'm
simply informing you of the way things are. You can deal with it, or
you can find yourself in a lot of killfiles -- because nobody requires
*us* to communicate with *you* if you're unwilling to follow a
reasonable set of guidelines.
You're perfectly free to use the term "object", for example, in its
OOP sense; if you do so, I advise you to make it explicit that you're
using it that way. It's really not difficult.
[snip]
--
Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Comment