From: loafman AT gte DOT net (Kenneth Loafman) Newsgroups: comp.os.msdos.djgpp Subject: Re: Volatile Date: 7 Aug 1997 17:13:53 GMT Organization: Loafman Software Lines: 23 Message-ID: <5scvoh$iem$1@gte2.gte.net> References: <33E8495B DOT 3EBC AT starnets DOT ro> <33E8C02A DOT 438A AT sprintmail DOT com> Reply-To: loafman AT gte DOT net NNTP-Posting-Host: dfw73143.gte.net Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On Wed, 06 Aug 1997 11:19:22 -0700, Ionicis 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