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: Mike Miller
Subject: [Octave-bug-tracker] [bug #57879] strncmp(str_a, str_b, N) gives an error for N=0
Date: Wed, 11 Mar 2020 20:19:58 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36

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

Yes, there is no reason to modify .hgignore, that part of this patch should be
removed.

I don't think we need to have an example in the NEWS file, just the
description of the change.

The rest of this looks pretty good. I think we need to do some rewording and
reformatting for the text, we can understand the difficulty if English is not
your first language.

I would like to see a test that shows a true return value with completely
unequal strings, for example


%!assert <*57879> (strncmp ("abc", "def", 0))


Note that you don't need to pass 'true' as the second argument to 'assert' if
the first argument is a logical test. For example


assert (1, 1)            ## test two arguments for equality
assert (1 == 1)          ## test a single expressing for truth
assert (1 == 1, true)    ## second argument isn't needed


    _______________________________________________________

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]