integers in oct-files

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

integers in oct-files

Stef Pillaert-3
Hello,

I have a lot of .cc files, that I compiled to .oct files. I used integers
in them (multiplying a matrix with an int, calls like "octave_value(i)"
where i is an int, ...)

This all worked fine under octave 2.0.12 (at least, as I remember, it has
been a while...), but under 2.0.14 I have to convert all those integers to
doubles. Is this normal? Or has it something to do with installing RedHat
Linux 5.2 (and probably newer versions of c++)?

Sorry if this is a dumb question, I've been out of the whole thing for a
long period now...

Stef.


Reply | Threaded
Open this post in threaded view
|

integers in oct-files

John W. Eaton-6
On 22-Apr-1999, Stef Pillaert <[hidden email]> wrote:

| I have a lot of .cc files, that I compiled to .oct files. I used integers
| in them (multiplying a matrix with an int, calls like "octave_value(i)"
| where i is an int, ...)
|
| This all worked fine under octave 2.0.12 (at least, as I remember, it has
| been a while...), but under 2.0.14 I have to convert all those integers to
| doubles. Is this normal? Or has it something to do with installing RedHat
| Linux 5.2 (and probably newer versions of c++)?
|
| Sorry if this is a dumb question, I've been out of the whole thing for a
| long period now...

I'm not sure what change made it necessary, but yes, you need to write

  int i;

  ...

  octave_value ov (static_cast<double> (i));

or similar now.

jwe