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

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

[Octave-bug-tracker] [bug #50716] Undefined input to a classdef method


From: Guillaume
Subject: [Octave-bug-tracker] [bug #50716] Undefined input to a classdef method
Date: Tue, 4 Apr 2017 10:42:26 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0

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

                 Summary: Undefined input to a classdef method
                 Project: GNU Octave
            Submitted by: gyom
            Submitted on: Tue 04 Apr 2017 02:42:25 PM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error
                  Status: None
             Assigned to: None
         Originator Name: Guillaume
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

Using the following class:


classdef myclass < handle

  methods
    function obj = myclass
    endfunction

    function methodA (obj, varargin)
      varargin
    endfunction

  endmethods

endclassdef


call the methodA() method on a myclass object:


>> obj = myclass ();
>> str = "Octave";
>> methodA (obj, str);
varargin =
{
  [1,1] = Octave
}
>> obj.methodA (str);
varargin =
{
  [1,1] = Octave
}
>> methodA (obj, str(1:end));
varargin =
{
  [1,1] = Octave
}
>> obj.methodA (str(1:end));
varargin = {}(0x0)
error: invalid dimension inquiry of a non-existent value


The error seems to be linked to the use of 'end' in the method call, ie it
works with str, str(1:5) or with 'val' having been previously defined as
str(1:end).




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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