This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

constant value is changing

I have declared variable as,

const float a = 5.5;

In my project after compilation the program size is,

     data = 17.0 xdata = 4421 code = 38520

I am using 8031 with 64KB external EPROM and 8KB external RAM.

The settings in the target options is i specified only the memory range.

But when i run program i found the above is same for the first time(that is calculation is done with that declared constant value. This calculation is done everytime the corresonding function is called).

But i found that the constant value is same for the first time calculation but on the second time it is changing.

What is the problem i couldnt identify?

Please help me regrading this.

Do i need to any setting?