Problem concatenating structures.
David Bateman
David.Bateman at motorola.com
Thu Jul 31 11:03:08 CDT 2008
David Bateman wrote:
> I have little time to look at this at the moment, but wanted to document
> an issue I'm having with structure concatenation. Consider the code
>
> s = warning("query","Octave:imag-to-real")
> [s, s]
> [warning("query","Octave:imag-to-real"),
> warning("query","Octave:imag-to-real")]
> [s, warning("query","Octave:imag-to-real")]
> [warning("query","Octave:imag-to-real"),s]
>
> With a build from the hg tip I see
>
> octave:1> s = warning("query","Octave:imag-to-real")
> s =
> {
> identifier = Octave:imag-to-real
> state = off
> }
>
> octave:2> [s, s]
> ans =
> {
> 1x2 struct array containing the fields:
>
> identifier
> state
> }
>
> octave:3> [warning("query","Octave:imag-to-real"),
> warning("query","Octave:imag-to-real")]
> error: invalid row index = 121
> error: caught execution error in library function
> octave:3> [s, warning("query","Octave:imag-to-real")]
> error: invalid row index = 121
> error: caught execution error in library function
> octave:3> [warning("query","Octave:imag-to-real"), s]
> error: invalid row index = 121
> error: caught execution error in library function
>
> I see no reason for this difference, and valgrind doesn't report and
> error, but its stopping me implementing the intwarning function.. Any
> ideas of the cause?
>
> D.
>
>
Sorry to respond to my own mail, but I forgot to mention that this works
in 3.0.1, but not in 3.1.51+
Regards
David
--
David Bateman David.Bateman at motorola.com
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
More information about the Bug-octave
mailing list