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

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

[Octave-bug-tracker] [bug #57879] strncmp(str_a, str_b, N) gives an erro


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #57879] strncmp(str_a, str_b, N) gives an error for N=0
Date: Fri, 21 Feb 2020 20:34:54 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36

Follow-up Comment #1, bug #57879 (project octave):

it appears for Matlab 2019a, it returns 1 for any N<1.  


>> strncmp("abc","def",0)
ans =
  logical
   1
>> strncmp("abc","def",-1)
ans =
  logical
   1
>> strncmp("abc","def",-10)
ans =
  logical
   1


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57879>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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