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

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

[Octave-bug-tracker] [bug #59103] inputname() is incorrect for string-li


From: Rik
Subject: [Octave-bug-tracker] [bug #59103] inputname() is incorrect for string-like numeric inputs such as Inf, NaN, i
Date: Sat, 12 Sep 2020 16:39:21 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36

URL:
  <https://savannah.gnu.org/bugs/?59103>

                 Summary: inputname() is incorrect for string-like numeric
inputs such as Inf, NaN, i
                 Project: GNU Octave
            Submitted by: rik5
            Submitted on: Sat 12 Sep 2020 01:39:20 PM PDT
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: Confirmed
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: dev
         Discussion Lock: Any
        Operating System: Any

    _______________________________________________________

Details:

Consider this test function which is also attached to this bug report:


function tst_inputname (arg1)
  inputname (1)
endfunction


When called with a numeric input the result is an empty string ("")


octave:1> tst_inputname (1)
ans = 


However, when called with a numeric input that looks like a string the result
is a string, rather than an empty value.


octave:2> tst_inputname (Inf)
ans = Inf
octave:3> tst_inputname (j)
ans = j


Matlab correctly returns an empty string for these cases.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sat 12 Sep 2020 01:39:20 PM PDT  Name: tst_inputname.m  Size: 58B   By:
rik5

<http://savannah.gnu.org/bugs/download.php?file_id=49790>

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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