Re: A note on personal corruption as a result of using C
- From: Ben Bacarisse <ben.usenet@xxxxxxxxx>
- Date: Mon, 18 Feb 2008 18:35:53 +0000
spinoza1111 <spinoza1111@xxxxxxxxx> writes:
On Feb 18, 3:25 pm, "Clive D. W. Feather" <cl...@on-the-<snip>
train.demon.co.uk> wrote:
Once upon a time, Edward wrote a piece of code that went something likeYou proceeded to make the same mistake in your bubble sort. And your
this (I haven't memorised it, so exact details might be wrong):
for (intIndex = 0; intIndex < strlen (strString); intIndex++)
strCopy [intIndex] = strString [intIndex];
Don't worry too much about the detail; the key points are the use of
strlen in the loop test and the fact that the string is not modified by
the loop body.
Somebody pointed out that this was inefficient because strlen() gets
called every time round the loop and it would be better to compute it
once and store it in a variable. For some reason he seems to think that
this was a personal attack and, rather than accepting he misremembered
the semantics of loops in C, claims that the condition *should* be
evaluated only once. Or something like that - it's not always easy to
understand our Edward.
tone is vicious here, because you know you did, and you also know that
because people are afraid of your status, you weren't hounded.
Please back this up with a link to the message in question. You will
then be seen to be right. Simple. You need to do this because I
can't find it and that makes me think it does not exist.
You have not replied to my message where I link to the message I
*think* you mean and which then explains where I think your
misunderstanding comes from. All you have to do is say, "no, not that
one, this one" (with a link).
--
Ben.
.
- Follow-Ups:
- Re: A note on personal corruption as a result of using C
- From: spinoza1111
- Re: A note on personal corruption as a result of using C
- References:
- A note on personal corruption as a result of using C
- From: spinoza1111
- Re: A note on personal corruption as a result of using C
- From: Keith Thompson
- Re: A note on personal corruption as a result of using C
- From: Clive D. W. Feather
- Re: A note on personal corruption as a result of using C
- From: spinoza1111
- A note on personal corruption as a result of using C
- Prev by Date: Re: Petition for the removal or voluntary departure of Richard Heathfield from this newsgroup
- Next by Date: Re: Dealing with ad hominem attacks in comp.programming
- Previous by thread: Re: A note on personal corruption as a result of using C
- Next by thread: Re: A note on personal corruption as a result of using C
- Index(es):
Relevant Pages
|
|