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

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

[Octave-bug-tracker] [bug #44855] isindex(): a string is an index?


From: Martin Kunz
Subject: [Octave-bug-tracker] [bug #44855] isindex(): a string is an index?
Date: Thu, 16 Apr 2015 13:47:58 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0

URL:
  <http://savannah.gnu.org/bugs/?44855>

                 Summary: isindex(): a string is an index?
                 Project: GNU Octave
            Submitted by: mkunz
            Submitted on: Do 16 Apr 2015 13:47:57 GMT
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Documentation
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.0-rc3
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

Hi,

I just noticed that


isindex ("a")


returns 1, which seems to be in line with what the interpreter does:


>> [1:255]("abc")
ans =

   97   98   99


This is counterintuitive, but maybe intended. However, the documentation for
isindex states "Valid indices are either positive integers (although possibly
of real data type), or logical arrays", which to my mind does not include
strings, so the output of the first example is not what I would expect.





    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

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