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

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

[Octave-bug-tracker] [bug #45457] Incorrect behavior of constant classde


From: anonymous
Subject: [Octave-bug-tracker] [bug #45457] Incorrect behavior of constant classdef properties referencing other constant properties in the same block
Date: Wed, 01 Jul 2015 18:12:33 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36

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

                 Summary: Incorrect behavior of constant classdef properties
referencing other constant properties in the same block
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Wed 01 Jul 2015 06:12:31 PM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.0
        Operating System: GNU/Linux

    _______________________________________________________

Details:

The following classdef, where NamedConst.D references NamedConst.R defined in
the same block does not work correctly with Ocatve 4.0.0.  In Matlab, this
same classdef works correctly according to
http://www.mathworks.com/help/matlab/matlab_oop/properties-with-constant-values.html

classdef NamedConst
   properties (Constant)
      R = pi/180;
      D = 1/NamedConst.R;
      AccCode = '0145968740001110202NPQ';
      RN = rand(5);
   end
end

The expected result is that NamedConst.D = 57.296.  In Octave 4.0.0, however,
NamedConst.D is undefined when accessing it.  In addition, all properties
defined after "D" are also undefined.




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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