Bus error when defining two vars of the same type and on the same line in a class
Hello all, I am getting Bus error when I define two member vars of the same type and on the same line in classes. example code: public class foo_class { float a, b; <-------- line causing the problem. fun void div(float x, float y) { x => a; y => b; <<< "result: ", x/y >>>; } } // end_of_foo_class // instantiation: foo_class foo; // call function: here comes the problem foo.div(); The problem arises when any member function is called. No problems at all when instantiating. However if one replaces the line " float a,b; " by separate declarations of a and b then it works fine, thus: float a; float b; I've not been able to reproduce the error when float a, b; is declared outside of a class. Thus the following works ok: float a, b; fun void div(float x, float y) { x => a; y => b; <<< "result: ", x/y >>>; } while( true ) div( std.rand2f(0.0001, 1), std.rand2f(0.0001,1) ); Eduard
Hello again!
I am getting Bus error when I define two member vars of the same type and on the same line in classes.
Aha. This is a bug and is on the list to be fixed for 1.2.0.1. Thanks for reporting this! Best, Ge!
participants (2)
-
eduard
-
Ge Wang