help-octave
[Top][All Lists]
Advanced

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

Re: Strcmp not behaving as expected


From: Martin Helm
Subject: Re: Strcmp not behaving as expected
Date: Mon, 22 Oct 2012 14:26:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1

Am 22.10.2012 13:52, schrieb c.:
> On 22 Oct 2012, at 12:38, Mumble07 wrote:
>
>> I'm running octave version 3.6.2, the latest version on the Suse repository.
>> 'which strcmp' returns 'strcmp is a built-in function'.
> You should report this as a packaging bug to the Suse repository maintainers,
> your system seems to be badly broken. 
>
> With the same Octave version buil from sources on Scientific Linux I get:
>
> octave:1> version
> ans = 3.6.2
> octave:2> strcmp ('vent', 'vent') 
> ans =  1
> octave:3> strcmp ('g_90', 'vent') 
> ans = 0
> octave:4> strcmp ('g_90', 'nograv')
> ans = 0
> octave:5>
>
> In Octave sources strcmp with string inputs maps to just:
>
> static bool
> strcmp_str_op (const std::string& s1, const std::string& s2, octave_idx_type)
> {
>   return s1 == s2;
> }
>
> which is a very basic method in the C++ standard library, I really wonder 
> what can be going wrong here ...
>
> c.
>
> _
I have not the simplest problems with this on openSUSE with octave 3.6.2
from the science repository, gives correct results and works.



reply via email to

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