Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Re: printf() question

Reply
Thread Tools

Re: printf() question

 
 
Dan Pop
Guest
Posts: n/a
 
      07-02-2003
In <bduspm$qop$(E-Mail Removed)> "Jun Woong" <(E-Mail Removed)> writes:


>"Dan Pop" <(E-Mail Removed)> wrote in message news:bduelq$r2l$(E-Mail Removed)...
>> In <bdsd0e$is4$(E-Mail Removed)> "Jun Woong" <(E-Mail Removed)> writes:

>[...]
>> >
>> >Aha! That's the reason that people often say your rudeness - you have
>> >no idea of what you're doing.

>>
>> Isn't that a rude remark?

>
>No, it's just a try to enlighten you on what you're doing.


No need: I know perfectly well what I'm doing.

>Have you
>ever read Keith's advice posted in c.s.c before? I never think that
>some mistakes by a person made in other context does justify to
>completely ignore his opinion.


When the person has made as many *elementar* mistakes in a relatively
short period of time, his opinion can no longer be considered reliable.

On more esoteric issues, it is not at all uncommon for other committee
members to disagree with Doug. And since they don't have Doug's history
of elementary goofs...

>[...]
>> >
>> >If the exit status doesn't count as an output, the unspecified exit
>> >status doesn't make the program not s.c. while the mere invocation of
>> >UB does.

>>
>> There is no invocation of UB, unless you can *prove* otherwise.

>
>This also applies to you, since the wording in question is actually
>defective, which means that it's ambiguous and opens possibility for
>two different interpretations.


Nope: the text in question is NOT defective and it doesn't contain the
expression "undefined behaviour". Furthermore, its *absence* would imply
undefined behaviour. Q.E.D.

>> Your
>> personal interpretations of the standard are of no interest to me, when
>> they are at odds with both common sense

>
>You always think that what you believe is in accordance with common
>sense even when numbers of people say that's not the intent or truth,


Yes, it is not uncommon for the intent on the committee to be different
from what a common sense-based interpretation of their text suggests.
It is not uncommon for different committee members to interpret the
standard in different ways, either. Is any of these my fault?

>which is explicitly self-assertive. I strongly recommend you to learn
>how to discuss on a technical subject.


I know how to do it, thank you very much.

Please drop these personal remarks when discussing a technical issue:
I am not interested. If you continue, I can do the same, degrading the
technical contents of the discussion even further. See some samples
below.

>> and the opinions of some reliable
>> committee members.

>
>The document I mentioned repeatedly is written by a reliable committee
>member too and I don't think that Doug is not a reliable member
>considering his work done through process of C99 I've seen. More
>importantly I believe him more than you.


Believe whomever you want. At your risk. It is sheer stupidity to take
Doug's opinion over that of other committee members. But if he's the
*only* committee member whose opinion supports yours...

>Regardless of what you're thinking, the way in which you said about
>the exit status of main() executing "return;" is not proper, which is
>what I claim consistently; you should have said in more negative
>tones.


I'm afraid this paragraph is too incoherent to allow any comments.
Try to put your thoughts into better English and avoid long statements.

The text in question serves exactly *one* purpose: to point out that a
program that doesn't return anything from main does NOT invoke undefined
behaviour and the *only* thing that is left undefined by the standard is
the program's exit status. Why? Because in the absence of that text,
*other* parts of the standard would render the program's behaviour
undefined. But this kind of common sense-based reasoning doesn't seem to
have much appeal for you...

Anyway, you can still post the question in comp.std.c...

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
 
 
 
Jun Woong
Guest
Posts: n/a
 
      07-02-2003

"Dan Pop" <(E-Mail Removed)> wrote in message news:bdv382$g9r$(E-Mail Removed)...
> In <bduspm$qop$(E-Mail Removed)> "Jun Woong" <(E-Mail Removed)> writes:

[...]
> >
> >This also applies to you, since the wording in question is actually
> >defective, which means that it's ambiguous and opens possibility for
> >two different interpretations.

>
> Nope: the text in question is NOT defective and it doesn't contain the
> expression "undefined behaviour".


The description for the relational operators doesn't also contain it,
does it?

> Furthermore, its *absence* would imply
> undefined behaviour. Q.E.D.


Irrelevant. You don't understand my answer to your past question yet.
The absence of the problematic description for the relational
operators does also imply undefined behavior, but it exists there with
the defective wording "the result is undefined" and the committee
explicitly said that "undefined behavior" was intended.

> >
> >You always think that what you believe is in accordance with common
> >sense even when numbers of people say that's not the intent or truth,

>
> Yes, it is not uncommon for the intent on the committee to be different
> from what a common sense-based interpretation of their text suggests.


The common sense-based interpretation of "undefined result" is
different from the real intent, "undefine behavior" as showed in the
DR. Why should the "undefined status" differ? Just because you believe
so?

> Please drop these personal remarks when discussing a technical issue:
> I am not interested. If you continue, I can do the same, degrading the
> technical contents of the discussion even further. See some samples
> below.


You didn't need to show the samples, since you've already showed it
many times.

> Because in the absence of that text,
> *other* parts of the standard would render the program's behaviour
> undefined.


Is this an only evidence to support your argument? See above.

My question: don't you agree with my position that the wording in
question is defective? What you meant is that it's well written and
wouldn't need a DR against it if assuming that we can still submit
a DR to C90, isn't it?


--
Jun, Woong ((E-Mail Removed))
Dept. of Physics, Univ. of Seoul



 
Reply With Quote
 
 
 
 
Jun Woong
Guest
Posts: n/a
 
      07-03-2003

"Dan Pop" <(E-Mail Removed)> wrote in message news:be1421$elo$(E-Mail Removed)...
> In <bdv66i$85u$(E-Mail Removed)> "Jun Woong" <(E-Mail Removed)> writes:


>
> It is downright idiotic to extrapolate from one badly written paragraph to
> a correctly written paragraph, isn't it?
>

[...]
>
> Not until you explain *why* it is irrelevant. The text *explicitly*
> REMOVES undefined behaviour, leaving *only* the exit status undefined.
>
> Therefore, the first example program in K&R2 is NOT a program invoking
> undefined behaviour, but a strictly conforming program.
>


Repeated maintenance without any improvement.

> >You don't understand my answer to your past question yet.
> >The absence of the problematic description for the relational
> >operators does also imply undefined behavior,

>
> There is no undefined behavior implied there by the actual text.
> The committee wanted the behaviour to be undefined, but goofed when
> writing it down.

[...]
> Have they ever said anything similar about the text under
> discussion?


Because of the DR, the committee left some possibility for the
"undefined" something that can be treated as "undefined value" to be
understood to mean "undefined behavior":

The C Standard uses the term ``indeterminately valued'' not
``undefined value.''

> >
> >The common sense-based interpretation of "undefined result" is
> >different from the real intent, "undefine behavior" as showed in the
> >DR. Why should the "undefined status" differ? Just because you believe
> >so?

>
> Just because you cannot extrapolate one DR to a piece of text that has
> absolutely nothing to do with it.


Nothing to do with it? It's just your personal opinion. From the
document written by a committee member:

and change the last sentence of subclause 5.1.2.2.3 [...]

[The concept of undefined value is carefully avoided elsewhere.]

>
> Yes, it would have been better to use "unspecified" instead of "undefined"


That's what I'd like to say and the reason that you should have
answered in more negative tones in your previous posting. Note that I
can agree with that the intent of the committee might be to put
"unspecified value" in that context, but I never agree with your
wording, "it's *explicitly* allowed."

> since the standard doesn't say
> anywhere that "undefined" can be used as shorthand for "undefined
> behaviour" and, therefore, the definition of "undefined behaviour" CANNOT
> be extented to "undefined", despite your desperate efforts of doing it,
> based on *one* instance where the committee talked about "undefined value"
> when it meant "undefined behaviour".


See the above citations and please engage your brain this time.

>
> Then again, even if it's too late for a DR, you can still ask in c.s.c.
>


As you know, a discussion in c.s.c can't form an authoritative
interpretation unless it's published as an official answer to a DR or
a TC. I already agree with your position that the "unspecified value"
is intended there considering the current wording of C99, but what I
keep saying is that the wording itself is not written well with the
evidences mentioned above.

I don't want to waste any more time with this discussion that has no
practical value, because it's not the first time that you use poorly-
phrased wording in your answer. I just hope newbies here not to accept
it as it's written.


--
Jun, Woong ((E-Mail Removed))
Dept. of Physics, Univ. of Seoul



 
Reply With Quote
 
Kevin Easton
Guest
Posts: n/a
 
      07-03-2003
Jun Woong <(E-Mail Removed)> wrote:
[...]
> That's what I'd like to say and the reason that you should have
> answered in more negative tones in your previous posting. Note that I
> can agree with that the intent of the committee might be to put
> "unspecified value" in that context, but I never agree with your
> wording, "it's *explicitly* allowed."


Huh? You're saying that because the committee *could* release a DR
changing the meaning of that section, it can't be interpreted as
written? It seems to me that, on the contrary, it *is* explicitly
allowed up to and until such a DR or TC is issued.

- Kevin.

 
Reply With Quote
 
Jun Woong
Guest
Posts: n/a
 
      07-04-2003

"Kevin Easton" <(E-Mail Removed)> wrote in message news:newscache$uy1hhh$37a$(E-Mail Removed)...
> Jun Woong <(E-Mail Removed)> wrote:
> [...]
> > That's what I'd like to say and the reason that you should have
> > answered in more negative tones in your previous posting. Note that I
> > can agree with that the intent of the committee might be to put
> > "unspecified value" in that context, but I never agree with your
> > wording, "it's *explicitly* allowed."

>
> Huh? You're saying that because the committee *could* release a DR
> changing the meaning of that section, it can't be interpreted as
> written? It seems to me that, on the contrary, it *is* explicitly
> allowed


Have you ever read all of the citations in my posting? Because there
was a published DR which implied that it was the intent to interpret
"undefined" something (similar to "undefined value") as to mean
"undefined behavior," and because there was a committee document where
a committee member mentioned the problem which the sentence in
question had, what I meant is that it's more proper to say "as I know,
the intent is to allow such a construct" rather than "it's explicitly
allowed."

> up to and until such a DR or TC is issued.
>


C90 was superseded, so a DR or TC against C90 can't be published
any more.


--
Jun, Woong ((E-Mail Removed))
Dept. of Physics, Univ. of Seoul



 
Reply With Quote
 
Kevin Easton
Guest
Posts: n/a
 
      07-04-2003
Jun Woong <(E-Mail Removed)> wrote:
>
> "Kevin Easton" <(E-Mail Removed)> wrote in message news:newscache$efrhhh$gzc$(E-Mail Removed)...

[...]
>> In other words, whether or
>> not it is explicitly allowed is something that can be derived from the
>> text of the standard alone (as amended), and not from any non-normative

> ~~~~~~~~~~~~~~~~~~~~~~~~~~
>> comments, theories or other verbiage.

> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> This is very foolish attitude to understand the standard, considering
> that the standard itself is just means to express the committee's
> intent; of course, I think that they should be more positive to revise
> the normative text. This has already been discussed in c.s.c, I don't
> want to repeat it. Moreover, according to your logic that's same as
> Dan's, the following program is strictly conforming in C90 because the
> normative text covered by the mentioned DR didn't be re-written and
> the committee's answer given in DR is never normative by itself.
>
> int main(void)
> {
> int *p = 0;
> p < 0; /* s.c. in C90, but not s.c. in C99? */
> }


Perhaps I don't know enough about the standardisation process, but I was
under the impression that a DR answer was taken to amend the text of the
standard?

- Kevin.

 
Reply With Quote
 
Jun Woong
Guest
Posts: n/a
 
      07-04-2003

"Kevin Easton" <(E-Mail Removed)> wrote in message news:newscache$8taihh$5l8$(E-Mail Removed)...
[...]
>
> Perhaps I don't know enough about the standardisation process, but I was
> under the impression that a DR answer was taken to amend the text of the
> standard?
>


Only some of them are taken to amend if the committee decides to
publish them as a TC (technical corrigendum) for the standard. The
rest of them just provide an explanation or the intended
interpretation which forms the authoritative interpretation but are
not taken as a normative text.


--
Jun, Woong ((E-Mail Removed))
Dept. of Physics, Univ. of Seoul



 
Reply With Quote
 
Kevin Easton
Guest
Posts: n/a
 
      07-05-2003
Jun Woong <(E-Mail Removed)> wrote:
>
> "Kevin Easton" <(E-Mail Removed)> wrote in message news:newscache$8taihh$5l8$(E-Mail Removed)...
> [...]
>>
>> Perhaps I don't know enough about the standardisation process, but I was
>> under the impression that a DR answer was taken to amend the text of the
>> standard?
>>

>
> Only some of them are taken to amend if the committee decides to
> publish them as a TC (technical corrigendum) for the standard. The
> rest of them just provide an explanation or the intended
> interpretation which forms the authoritative interpretation but are
> not taken as a normative text.


So in the case you mentioned (relational operators), it should have been
a TC, because the existing text wasn't just misleading, but actually
meant something different to what was intended?

- Kevin.

 
Reply With Quote
 
Jun Woong
Guest
Posts: n/a
 
      07-05-2003

"Kevin Easton" <(E-Mail Removed)> wrote in message news:newscache$zbzihh$5sg$(E-Mail Removed)...
> Jun Woong <(E-Mail Removed)> wrote:
> >

[...]
> >
> > Only some of them are taken to amend if the committee decides to
> > publish them as a TC (technical corrigendum) for the standard. The
> > rest of them just provide an explanation or the intended
> > interpretation which forms the authoritative interpretation but are
> > not taken as a normative text.

>
> So in the case you mentioned (relational operators), it should have been
> a TC,


I think that many of DRs are worth being a TC (at least, in order not
to make a situation like this), but the committee isn't positive to
revise the normative text for a reason.

> because the existing text wasn't just misleading, but actually
> meant something different to what was intended?
>


I don't know what stopped them from publishing it as a TC for C90, but
my understanding is that the committee tried to solve the DR by
providing a general principle to interpret the standard, as you saw
the sentence cited in one of my postings. Of course, I have no idea of
whether or not they considered existence of "undefined status" when
writing up the answer, but the resulting DR made the text in question
unclear, which is my point and the reason that Clive, a committee
member tried to rewrite it in handling some stuff for C99.


--
Jun, Woong ((E-Mail Removed))
Dept. of Physics, Univ. of Seoul



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
question row filter (more of sql query question) =?Utf-8?B?YW5kcmV3MDA3?= ASP .Net 2 10-06-2005 01:07 PM
Quick Question - Newby Question =?Utf-8?B?UnlhbiBTbWl0aA==?= ASP .Net 4 02-16-2005 11:59 AM
Question on Transcender Question :-) eddiec MCSE 6 05-20-2004 06:59 AM
Question re: features of the 831 router (also a 924 question) Wayne Cisco 0 03-02-2004 07:57 PM
Syntax Question - Novice Question sean ASP .Net 1 10-20-2003 12:18 PM



Advertisments