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

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

[Octave-bug-tracker] [bug #50202] automatic padding: a(3)=4


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #50202] automatic padding: a(3)=4
Date: Sun, 5 Feb 2017 18:57:59 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0

Follow-up Comment #13, bug #50202 (project octave):

I believe the following Matlab documentation page describes how it handles
indexed assignment, including what it does if the object doesn't exist:

https://www.mathworks.com/help/matlab/matlab_oop/indexed-assignment.html

specifically: 

"If A does not exist before you execute the assignment statement, then MATLAB
initializes the five array elements that come before A(2,3) with default
objects of class B. "

So as said in comment #9, this default object is 0.0 for floating point
numbers, 0 or false for logical, etc. but it may not be 'null' for other
classes. I've never messed with classes, but I assume a 'default object' is
defined when one is created. Is there any case to verify that Octave follows
that behavior if the default is not a 'null'?

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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