At 11:31 AM 4/9/05 +0000, charlesgrenz wrote: >When ever you use a global variable, you have to specify it as a >volatile to tell the compiler not to opitmize the variable out of the >equation when working with any ANSI C compiler. Um, no. The C compiler MUST assume that any global variable can change across a function call if it can't trace the call (ie if it's in a separate module). Once a call is made outside of the compiler 'sight' all globals have to be considered changed by the compiler. Now once a routine has read a global it can assume it's unchanged until it's made a function call unless it's declared as volatile. But in this case volatile will make no difference. Robert " 'Freedom' has no meaning of itself. There are always restrictions, be they legal, genetic, or physical. If you don't believe me, try to chew a radio signal. " -- Kelvin Throop, III http://www.aeolusdevelopment.com/
Message
Re: [lpc2000] Re: float in interrupt function?
2005-04-09 by Robert Adsett
Attachments
- No local attachments were found for this message.