Error - "some elements undefined in return list"
nit ar
nit_ar at hotmail.com
Sun Dec 2 07:33:33 CST 2007
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>
Regards Nitzan Arazi
_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20071202/66b2edb1/attachment.html
More information about the Bug-octave
mailing list