--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: octave2.9: multiple assignment to a struct array
- From: Francesco Potorti` <Potorti@isti.cnr.it>
- Date: Sun, 23 Dec 2007 11:22:17 +0100
- Message-id: <E1J6NyL-0001ln-9F@tucano.isti.cnr.it>
Package: octave2.9
Version: 1:2.9.14-1
Severity: normal
octave> s=struct("a",{},"b",{},"c",{},"d",{});
octave> s(1).a=1;
octave> [s(1).b s(1).c s(1).d]=sscanf("2 3 4","%d %d %d","C");
octave> s(2).a=11;
octave> [s(2).b s(2).c s(2).d]=sscanf("12 13 14","%d %d %d","C");
error: some elements undefined in return list
error: evaluating assignment expression near line 42, column 25
This error does not happen with octave 2.1.73-13, which indeed does the
expected thing.
Octave 2.9.14-1 does something different, which in my opinion is an
error, and which is not easy for me to explain in words. Just remove
the semicolons at the end of the statements and see for yourself.
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'testing-proposed-updates')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.22-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=it_IT@euro (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/bash
Versions of packages octave2.9 depends on:
ii atlas3-base [liblapack 3.6.0-20.6 Automatically Tuned Linear Algebra
ii lapack3 [liblapack.so. 3.0.20000531a-6.1 library of linear algebra routines
ii libc6 2.7-4 GNU C Library: Shared libraries
ii libcurl3-gnutls 7.17.1-1 Multi-protocol file transfer libra
ii libfftw3-3 [fftw3] 3.1.2-3 library for computing Fast Fourier
ii libg2c0 1:3.4.6-6 Runtime library for GNU Fortran 77
ii libgcc1 1:4.2.2-4 GCC support library
ii libglpk0 4.24-1 linear programming kit with intege
ii libhdf5-serial-1.6.5-0 1.6.5-5+b1 Hierarchical Data Format 5 (HDF5)
ii libncurses5 5.6+20071124-1 Shared libraries for terminal hand
ii libpcre3 7.3-2 Perl 5 Compatible Regular Expressi
ii libqhull5 2003.1-7 calculate convex hulls and related
ii libreadline5 5.2-3 GNU readline and history libraries
ii libstdc++6 4.2.2-4 The GNU Standard C++ Library v3
ii libsuitesparse 3.0.0-7 collection of libraries for comput
ii refblas3 [libblas.so.3 1.2-8 Basic Linear Algebra Subroutines 3
ii texinfo 4.11.dfsg.1-2 Documentation system for on-line i
ii zlib1g 1:1.2.3.3.dfsg-7 compression library - runtime
Versions of packages octave2.9 recommends:
ii gnuplot 4.2.2-1 A command-line driven interactive
-- no debconf information
--- End Message ---
--- Begin Message ---
* Francesco Potorti` <Potorti@isti.cnr.it> [2008-01-18 13:00]:
> >> Package: octave2.9
> >> Version: 1:2.9.14-1
> >> Severity: normal
> >>
> >> octave> s=struct("a",{},"b",{},"c",{},"d",{});
> >> octave> s(1).a=1;
> >> octave> [s(1).b s(1).c s(1).d]=sscanf("2 3 4","%d %d %d","C");
> >> octave> s(2).a=11;
> >> octave> [s(2).b s(2).c s(2).d]=sscanf("12 13 14","%d %d %d","C");
> >> error: some elements undefined in return list
> >> error: evaluating assignment expression near line 42, column 25
>
> >I cannot replicate the bug with octave2.9 2.9.19-2, the version currently in
> >unstable. Could you please confirm that this is also the case for you?
>
> I just upgraded to octave3.0 and indeed the bug is not there. I suppose
> that you can close it.
Done, thanks.
--
Rafael
--- End Message ---