[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #32863] x.y.z syntax for structure fails ("sca
From: |
Marco Caliari |
Subject: |
[Octave-bug-tracker] [bug #32863] x.y.z syntax for structure fails ("scalar cannot be indexed with .") |
Date: |
Tue, 22 Mar 2011 07:50:30 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 |
Follow-up Comment #3, bug #32863 (project octave):
After the warning, I get
See MATLAB 7.0.4 Release Notes, Assigning Nonstructure Variables As Structures
Displays Warning for details.
and clicking on it
---------------
signing to a nonstructure variable as if it were a structure is not
recommended in MATLAB. For example, if variable x holds a double (as shown
below), then attempting to add a fieldname to it, thus converting x to a
structure, is not good programming practice and should generate an error.
x = 10;
x.name = magic(3);
Note that if x were empty (i.e., x == []), then assigning a field to it as if
it were already a structure is acceptable.
--------------
I'm using 7.6.0.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?32863>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/