delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/10/16:33:51

Date: Sun, 10 Aug 1997 16:33:27 -0400 (EDT)
From: Michael Phelps <morphine AT hops DOT cs DOT jhu DOT edu>
To: Ionicis <anfamily AT sprintmail DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Volatile
In-Reply-To: <33E8C02A.438A@sprintmail.com>
Message-ID: <Pine.GSO.3.96.970810163108.7809A-100000@hops.cs.jhu.edu>
MIME-Version: 1.0

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



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019