|
From: Ioannis V. <iv...@em...> - 2003-06-19 16:23:54
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Louis Godio > Sent: Thursday, June 19, 2003 4:14 PM > To: DEVCppUsers > Subject: [Dev-C++] C keyword 'volatile' > > > Can anyone explain the C keyword 'volatile' > as in the statement: volatile int x; > > What does this do to variable x ? when does one need to use it ? It tells to the compiler that the value of the variable may change by an external factor (e.g. a thermometer) so it can make no assumptions about what its current value is, but always read it when its value is requested. Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL 1: http://run.to/noicys * Alternative URL 2: http://www.noicys.cjb.net |