2006-03-15 08:25 PM
2006-03-15 12:07 AM
Hi.Why sometimes cosmic omits some lines in spite of I am writing
sample: void x(void) { y=4;//it is not seen by cosmic!!!ERROR 2 lines y=6;//y is global variable and cosmic loads 0 in place of 6 if(y y=512; } I am simulating these lines by debugging program ZAP sometimes RIDE2006-03-15 08:25 PM
Al ot of emergencies arond there, I see ... 8-)
As Luter explained in another post, you are facing a problem of optimization: you are writing code that does nothing, so the compiler optimizes it away. If you want to keep such code, for example for practising, you need to declare the variables as ''volatile'' and/or to turn off all optimizations (add -no on the compiler command line, probably there is also a stvd7 menu to do the same thing). Regards, Luca