Error - "some elements undefined in return list"
John W. Eaton
jwe at bevo.che.wisc.edu
Mon Dec 3 13:54:21 CST 2007
On 2-Dec-2007, nit ar wrote:
| Hello Octave maintainers !
|
| An error is caused by the following example (test.m script and testf.m function) when the script calls a function and attempts to return structure values to new fields of a structure which already exists.
|
| There is a strange behavior in the following example: while the call on the 3rd line is successful, the call on the 4th line fails (names of the new fields are 2-letter ?).
|
| See also strange d.ca.a conetnts printout on the console !
|
| This may be related to the patch provided by
| http://www.cae.wisc.edu/pipermail/bug-octave/2007-October/003645.html
| which has fixed another problem of assigning values to an output list. As far as I remember the current error didn't occur on ver 2.9.15.
|
| I am currently running MSVC version 2.9.16 (compiled by Michael Goffioul)
|
| testing script test.m:*********************d.a=1;d.b=2;[d.c.a,d.c.b]=testf(1,2);[d.ca.a,d.ca.b]=testf(1,2);
| testing function testf.m:************************function [c1,c2]=atest(n1,n2)
| c1.a=n1;c1.b=n2;c2.a=n1;c2.b=n2;
| console output on activating test.m:**********************************octave.exe:5> testerror: some elements undefined in return listerror: evaluating assignment expression near line 4, column 16error: near line 4 of file `c:\Documents and Settings\user\My Documents\test\test.m'octave.exe:5>d ={ a = 1 b = 2 c = { a = { f1: 1x1 scalar f2: 0x0 matrix }
| b = { 2x1 struct array containing the fields:
| f1 f2 }
| }
| ca = { a =
| (, [1] = { f1: 1x1 scalar f2: 0x0 matrix }
| [2] = { 2x1 struct array containing the fields:
| f1 f2 }
| ,)
| }
| }
| octave.exe:6>
I'm having some trouble deciphering your message, and in any case, I
don't think you've provided enough information to allow anyone to
reproduce the problem.
jwe
More information about the Bug-octave
mailing list