help-octave
[Top][All Lists]
Advanced

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

another bug? with arrays of structures?


From: John W. Eaton
Subject: another bug? with arrays of structures?
Date: Mon, 2 May 2005 22:40:58 -0400

On  2-May-2005, address@hidden wrote:

| Hi all,
| after Johns patch got one error fixed, I am still having a problem.
| 
| In 2.1.50, the following works:
| a(1).b=4;
| c=a(1);
| a(1)=c;
| (actually I am using this in a function call, like a(1)=f(...), with a(1) 
being a struct.)
| 
| In 2.1.69 I get the following:
| a(1).b=4;
| c=a(1);  << same output as in 2.1.50
| a(1)=c
| octave:8> a(1)=b
| error: field name mismatch in structure assignment
| error: assignment to structure element failed
| error: assignment failed, or no method for `struct = struct'
| error: evaluating assignment expression near line 8, column 5

What is the value of b in the assignment a(1)=b above?

When assigning structures in this way, the RHS value must be a
structure with the same fields as the structure referenced on the LHS
of the assignment.

jwe



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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