Failure in building StatDataML for Octave 2.1.57

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Failure in building StatDataML for Octave 2.1.57

Rafael Laboissiere
After posting the message below in help-octave, I realized that
octave-maintainers would be a more appropriate forum.  Sorry for the
duplicates.

Rafael

----- Forwarded message from Rafael Laboissiere <[hidden email]> -----

From: Rafael Laboissiere <[hidden email]>
Subject: Failure build of StatDataML for Octave 2.1.57
Date: Wed, 17 Mar 2004 15:50:09 -0600
To: Help-Octave mailing list <[hidden email]>
Reply-To: Rafael Laboissiere <[hidden email]>
Organization: Debian GNU/Linux
X-Mailing-List: <[hidden email]>

Hi,

I am trying to build the StatDataML package (
http://cran.r-project.org/src/contrib/StatDataML_1.0-6.tar.gz) for Debian
using Octave 2.1.57.  Compilation fails with the following error message:

mkoctfile -I/usr/include/libxml2 -lxml2  readsdml.cc
readsdml.cc: In function `octave_value* GetStructureData(int*, char**,
   xmlNode*)':
readsdml.cc:987: error: no match for 'operator[]' in 'A[*(names++)]'
readsdml.cc: In function `octave_value* GetDescription(xmlNode*)':
readsdml.cc:1093: error: no match for 'operator[]' in 'S["properties"]'
readsdml.cc:1095: error: no match for 'operator[]' in 'S[Cur->_xmlNode::name]'
make[2]: *** [readsdml.oct] Error 1

Compilation was okay with Octave 2.1.50 and if I replace the lines like:

    Octave_map A;
    char** names;
    // ...      
    A[*names++] = *GetDataset(Cur);

by:

    A.assign (*names++, *GetDataset(Cur));
     
then compilation with 2.1.57 succeeds.  I am wondering why the [] operator
for the Octave_map class is not supported anymore.  Is the "assign" method
above backward compatible with older versions of Octave?

--
Rafael



-------------------------------------------------------------
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
-------------------------------------------------------------




----- End forwarded message -----

--
Rafael


Reply | Threaded
Open this post in threaded view
|

Failure in building StatDataML for Octave 2.1.57

John W. Eaton-6
On 19-Mar-2004, Rafael Laboissiere <[hidden email]> wrote:

| I am trying to build the StatDataML package (
| http://cran.r-project.org/src/contrib/StatDataML_1.0-6.tar.gz) for Debian
| using Octave 2.1.57.  Compilation fails with the following error message:
|
| mkoctfile -I/usr/include/libxml2 -lxml2  readsdml.cc
| readsdml.cc: In function `octave_value* GetStructureData(int*, char**,
|    xmlNode*)':
| readsdml.cc:987: error: no match for 'operator[]' in 'A[*(names++)]'
| readsdml.cc: In function `octave_value* GetDescription(xmlNode*)':
| readsdml.cc:1093: error: no match for 'operator[]' in 'S["properties"]'
| readsdml.cc:1095: error: no match for 'operator[]' in 'S[Cur->_xmlNode::name]'
| make[2]: *** [readsdml.oct] Error 1
|
| Compilation was okay with Octave 2.1.50 and if I replace the lines like:
|
|     Octave_map A;
|     char** names;
|     // ...      
|     A[*names++] = *GetDataset(Cur);
|
| by:
|
|     A.assign (*names++, *GetDataset(Cur));
|      
| then compilation with 2.1.57 succeeds.  I am wondering why the [] operator
| for the Octave_map class is not supported anymore.

Because there was no easy way to distinguish when it was used for
extracting values vs. assignment and the semantics required by each
are different.

| Is the "assign" method above backward compatible with older versions
| of Octave?

No.

jwe