Hello,
We had a complex simulation program to assist systems’ reliability. Anyhow the code was written in Octave 4.0.2. We have observed that the same code does not work on Octave 4.4.1 and the reason that ( 'exprnd’ undefined)! This function generates random numbers with exponential distribution. Is it a bug or the function has been removed from the new version of Octave?
Thank you
Mohammed Elmusrati
--------------------------------------- Mohammed Elmusrati, Full Professor Head of Industrial Digitalization Team Faculty of Technology University of Vaasa Phone: +358 50 4003763
On 11/02/2018 11:36 AM, John W. Eaton wrote:On 11/02/2018 02:10 PM, Rik wrote:
11/2/18
I checked in a changeset to deprecate the C++ function is_hghandle in favor of ishghandle (https://hg.savannah.gnu.org/hgweb/octave/rev/fbc23950b00a). Where possible, it is better to have the C++ function names match the Octave language functions so that programmers who are unfamiliar with the core C++ code can, nevertheless, follow what the code is doing.
However, I'm now getting compilation messages that deprecated functions are unused. This hasn't been a problem before because the use of the OCTAVE_DEPRECATED macro has been in .h header files, but the most recent change takes place in a .cc file.
One possible solution is to have the OCTAVE_DEPRECATED macro also set the attribute for unused. Or, programmers could specifically add the OCTAVE_UNUSED decoration to the function as well. This works, but to my eye seems long and klunky. But, we also shouldn't care too much since this code will be deleted within two versions of Octave.
OCTAVE_UNUSED OCTAVE_DEPRECATED (5.0, "use 'ishghandle' instead")
Does anyone else have an opinion on which path to take?
There's no need to mark a static function as deprecated since its scope is only inside the file where it is defined. So you can simply remove it if it is no longer needed.
Good point. I removed the unnecessary functions.--Rik
|