discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] GUI problems with 3.7


From: Sylvain Munaut
Subject: Re: [Discuss-gnuradio] GUI problems with 3.7
Date: Sat, 22 Jun 2013 14:48:45 +0200

Hi,

>> Huh ... but strcmp will stop comparing at the end of any of the two
>> strings anyway.
>
> No, that's not true. If that were the case then string "abc" would be
> equal to string "ab", and strcmp knows that they are different (I
> tested this to be sure; it returns 99, while strcmp("abc", "abc")
> returns 0, as it should). I even tested this adding a new line onto
> one of the strings and strcmp reads them both through completely and
> tests that, not just the length of the shortest string.

Sorry I wasn't clear.

I didn't mean that it will return a match. I meant that it will stop
scanning through the strings as soon as one ends.
Whatever the result of the last comparaison it did will be used to
determine the return value.
In the case of "ab" vs "abc" the last comparaison is between '\0' and 'c'.

Cheers,

   Sylvain



reply via email to

[Prev in Thread] Current Thread [Next in Thread]