[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #65155] Classdef Default Constructor
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #65155] Classdef Default Constructor |
Date: |
Fri, 12 Jan 2024 22:25:41 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?65155>
Summary: Classdef Default Constructor
Group: GNU Octave
Submitter: None
Submitted: Sat 13 Jan 2024 03:25:41 AM UTC
Category: Classdef
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: dev
Discussion Lock: Any
Operating System: Any
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Sat 13 Jan 2024 03:25:41 AM UTC By: Anonymous
According to the MATLAB documentation it is possible to define a class without
explicitly defining a constructor. MATLAB supplies a default constructor. But
Octave classdefs currently need an explicitly defined constructor.
"If a class does not define a constructor, MATLAB supplies a default
constructor that takes no arguments and returns a scalar object whose
properties are initialized to property default values. The default constructor
supplied by MATLAB also calls all superclass constructors with no arguments or
with any argument passed to the default subclass constructor."[1]
Example of a class without an explicitly defined constructor:
classdef class_without_ctor
end
[1]
https://www.mathworks.com/help/matlab/matlab_oop/class-constructor-methods.html#mw_93c8affb-2f7c-4b6a-b8b7-ae74a7203f0f
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65155>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #65155] Classdef Default Constructor,
anonymous <=