2014-09-10 11:20 PM
Hello all,
I`m having some issues using the double or float datatype in STVD with the COSMIC C compiler. I am able to declare those data types but when i start debugging and would like to watch the varibles, STVD shows weird values. for example the simple division 5.0 / 3.0 resolutes in 1,...E-37 which is something like 0. Using float data type has the same effect. I was using break points and the command 'quick watch'. Dennis2014-09-11 09:35 PM
2014-09-14 11:07 PM
Hey,
thanks. Yeah this doesn`t work :( Dennis2014-09-15 12:49 AM
2014-10-09 07:09 AM
Hello Luca,
not even simple programs work. For example: main(){ double test = 0.0; test = 5 / 3; } And watching this variable test shows the same ... Thanks.2014-10-10 01:59 AM
test = 5.0 / 3.0;
it works ok on my simulator/debugger. Also take care of the fact that, with very simple examples, some variables that are never used later are just optimized away by the compiler. I suggest you try the followingmain(){
volatile float test = 0.0; test = 5.0 / 3.0; } It works ok on my PC (zap debugger): if it still does not work for you I can try to get a copy of STVD and see where it goes wrong.2014-11-04 04:02 AM
Hi Luca,
thanks for your reply. In this case it was my fault and everything is going fine. Thanks!