Date: Sun, 10 Aug 1997 16:33:27 -0400 (EDT) From: Michael Phelps To: Ionicis cc: djgpp AT delorie DOT com Subject: Re: Volatile In-Reply-To: <33E8C02A.438A@sprintmail.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Wed, 6 Aug 1997, 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 :) No, this is _not_ true. Volatile means that a variable may be changed without the program's knowledge, which means that the compiler can't put it into a register or optimize away the variable. It's a useful ANSI C addition that C++ actually borrowed from. > -- > (~_Ionicis_~) > http://www.geocities.com/SiliconValley/Bay/2306/ <--- Go here! > ---Michael Phelps morphine AT cs DOT jhu DOT edu CH3 | N / | ______/ | / \ CH2 _____/ \__|__ // \\ / | \\ // \\______/___CH2 \\ \ / \ / \______/ \_____/ / ------ \ / \ OH \ / OH O Morphine