octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #37551] strcmp produces weird result


From: Jordi Gutiérrez Hermoso
Subject: [Octave-bug-tracker] [bug #37551] strcmp produces weird result
Date: Fri, 12 Oct 2012 17:46:16 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20110109 Seadinosaur/3.6.13

Follow-up Comment #2, bug #37551 (project octave):

I reproduce below what the original reporter sent to me via email:

Example1

actual code:

strcmp('a','a')

expected value: ans=1
returned value: ans=0

strcmpi('a','a') produces the expected value: ans=1

Example2

actual code:
choice='l';
strcmp(choice,{'l' 's' 'z' 'b' 'p' 'i'})

expected value: ans=1 0 0 0 0 0
returned value: error: cell type invalid as index source

strcmp(choice,{'l' 's' 'z' 'b' 'p' 'i'}) produces the expected value: ans=1 0
0 0 0 0

Cheers,

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?37551>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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