Mail Archives: djgpp/1997/08/10/22:05:05
On Wed, 06 Aug 1997 11:19:22 -0700, Ionicis <anfamily AT sprintmail DOT com>
wrote:
>Korenschi Francisc Eduard wrote:
>>
>> Hi,
>>
>> I know it sounds crazy, but what does the 'voltaile' with a
>> variable/function ?
>>
>> Thanx for bothering,
>> Eduard
>The volatile keyword makes a variable not "changable" by anything except
>the code itself. I'm pretty sure that's what it means :)
Just the opposite. Volatile means that the variable MAY BE changed by
something other then the code itself, i.e. by a device, by an interrupt
service routine, by another process. What this means to the compiler is
that it should not cache this variable in a register since each reference
to it should come from the volatile memory location.
...Kenneth
- Raw text -