Re: C (functional programming) VS C++ (object oriented programming)
- From: Richard <rgrdev@xxxxxxxxx>
- Date: Thu, 04 Oct 2007 19:26:24 +0200
santosh <santosh.k83@xxxxxxxxx> writes:
jacob navia wrote:
Richard Heathfield wrote:
jacob navia said:Heathfield
H. is arguing that strncmp is not a string comparison function.
That's right.[snip]
Yes, I agree that it's a comparison function. So what?
OK. I give up.
Are you really saying you don't know the difference between a comparison
function and string comparison function?
The crucial difference between strcmp and strncmp is that the former _needs_
it's arguments to be null-terminated strings while the latter doesn't.
There is a crucial difference between an array of characters, (which
needn't, but could be, a string), and a string.
This is another example of petty one upsmanship and word twisting. Both
work almost exactly the bloody same. The difference is that ONE of them
specifies the maximum number of characters to compare. Not a huge
difference but potentially a very optimal difference where the first N
characters are the UID of the object in question.
Yes, CLEARLY strmp needs a well formed string and strncmp doesnt.
To accuse someone of not knowing the difference between a comparison
function and a "string comparison" function is, in this case, trite and
petty when one considers that its very obvious that the poster knows
what the functions do.
.
- References:
- C (functional programming) VS C++ (object oriented programming)
- From: Joe Mayo
- Re: C (functional programming) VS C++ (object oriented programming)
- From: jacob navia
- Re: C (functional programming) VS C++ (object oriented programming)
- From: santosh
- Re: C (functional programming) VS C++ (object oriented programming)
- From: jacob navia
- Re: C (functional programming) VS C++ (object oriented programming)
- From: santosh
- Re: C (functional programming) VS C++ (object oriented programming)
- From: Richard Heathfield
- Re: C (functional programming) VS C++ (object oriented programming)
- From: Ben Pfaff
- Re: C (functional programming) VS C++ (object oriented programming)
- From: Richard Heathfield
- Re: C (functional programming) VS C++ (object oriented programming)
- From: Keith Thompson
- Re: C (functional programming) VS C++ (object oriented programming)
- From: Richard Heathfield
- Re: C (functional programming) VS C++ (object oriented programming)
- From: Charlie Gordon
- Re: C (functional programming) VS C++ (object oriented programming)
- From: Richard Weeks
- Re: C (functional programming) VS C++ (object oriented programming)
- From: Tor Rustad
- Re: C (functional programming) VS C++ (object oriented programming)
- From: Richard Heathfield
- Re: C (functional programming) VS C++ (object oriented programming)
- From: Tor Rustad
- Re: C (functional programming) VS C++ (object oriented programming)
- From: Richard Heathfield
- Re: C (functional programming) VS C++ (object oriented programming)
- From: jacob navia
- Re: C (functional programming) VS C++ (object oriented programming)
- From: Richard Heathfield
- Re: C (functional programming) VS C++ (object oriented programming)
- From: jacob navia
- Re: C (functional programming) VS C++ (object oriented programming)
- From: santosh
- C (functional programming) VS C++ (object oriented programming)
- Prev by Date: Re: C (functional programming) VS C++ (object oriented programming)
- Next by Date: Re: C (functional programming) VS C++ (object oriented programming)
- Previous by thread: Re: C (functional programming) VS C++ (object oriented programming)
- Next by thread: Re: C (functional programming) VS C++ (object oriented programming)
- Index(es):
Relevant Pages
|
|