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

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

[Octave-bug-tracker] [bug #49379] inputname(ii) in class constructor ret


From: anonymous
Subject: [Octave-bug-tracker] [bug #49379] inputname(ii) in class constructor returns inputname(ii+1)
Date: Tue, 18 Oct 2016 08:09:24 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:49.0) Gecko/20100101 Firefox/49.0

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

                 Summary: inputname(ii) in class constructor returns
inputname(ii+1)
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Tue 18 Oct 2016 08:09:22 AM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Miguel Glassee
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.0
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

Using inputname(ii) in the class constructor (e.g. the simple class in the
attached ctest.m) returns inputname(ii+1).
In other words, when you expect the first input argument, you get the second
and so one.  for ii = nargin, you get an 'index out of bounds' error.  

Code : ctest.m attached
commands:

a=1; b=2; c = ctest(a,b);


result :

error: ctest: A(I): index out of bounds; value 2 out of bound 1
error: called from
    ctest at line 10 column 34
    inputname at line 38 column 5
    ctest at line 10 column 34


expected: a class c with c.inputnames = {'a', 'b'}

Note: setting the upper bound of the for loop in the constructor to nargin-1
creates a class with c.inputnames = { 'b', []}




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tue 18 Oct 2016 08:09:22 AM UTC  Name: ctest.m  Size: 257B   By: None

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

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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