[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #51801] OO: constructor without arguments
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #51801] OO: constructor without arguments |
Date: |
Sun, 20 Aug 2017 08:03:44 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0 |
URL:
<http://savannah.gnu.org/bugs/?51801>
Summary: OO: constructor without arguments
Project: GNU Octave
Submitted by: None
Submitted on: Sun 20 Aug 2017 12:03:43 PM UTC
Category: Documentation
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name:
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
In the manual, Section 34.1 we read:
Ideally, even when the constructor is called with no arguments
it should return a valid object.
That is too weak.
Say, the class has name pn, then pn() defines the default value.
Default values are known (yet not mentioned in the documentation)
for primitive types:
As a consequence, writing a(3,3)=1 fills up a with zeros:
a =
0 0 0
0 0 0
0 0 1
Along the same lines, pn() is the default value
and so a(3,3)=pn(1)
yields
a =
0 0 0
0 0 0
0 0 1
also, where the 1 is created by pn(1)
and the 0 by pn() (not pn(0))!
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51801>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #51801] OO: constructor without arguments,
anonymous <=