[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
yet another DLD question
From: |
Andy+Alison Adler |
Subject: |
yet another DLD question |
Date: |
Wed, 04 Nov 1998 23:37:01 -0500 |
I've got this bizarre bug:
if I put my code
[SNIP]
Octave_map As;
[SNIP]
ColumnVector coefV= As["coef"] . vector_value();
double * coef = coefV . fortran_vec();
for ( int i= 0; i< nnz; i++ )
printf("a= %f\n", *(coef+i));
[SNIP]
then it works fine, giving output
a= 1.000000
a= 2.000000
a= 3.000000
etc.
However, if I try to abbreviate by putting
[SNIP]
double * coef = As["coef"] . vector_value() . fortran_vec();
for ( int i= 0; i< nnz; i++ )
printf("a= %f\n", *(coef+i));
[SNIP]
then the first value printed is always wrong
a= 39.399666
a= 1.000000
a= 2.000000
(the first value is often 39.??? but is sometimes different)
MY QUESTION IS:
is As["coef"] . vector_value() . fortran_vec() illegal?
or is this a bug?
or am I doing something wrong
thanks
andy,
- yet another DLD question,
Andy+Alison Adler <=