Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Re: volatile

Reply
Thread Tools

Re: volatile

 
 
David Sachs
Guest
Posts: n/a
 
      10-27-2003
"newsock" <(E-Mail Removed)> wrote in message
news:hSnmb.192282$(E-Mail Removed)...
> Why need to qualify a member function "volatile"?
>
> Why need to qualify a object "volatile"?
>
> When need to "const_cast" away "volatile" of an object and a member
> function?
>
> I also saw some code of a function argument of "volatile" type. What's

the
> purpose there?


The "volatile" qualifier for an item, indicates that the item is subject to
possible modification by some means outside the current program, and must
therefore be actually accessed every time it is referred to.

Common uses of volatile are for:

Items subject to modification by hardware, such as memory mapped IO
addresses.

Item subject to asynchronous modification by the operating system. This
may include items used as software interlocks.

It is perfectly legal, and often logical, for an item to be both const and
volatile. Such an item is subject to modification but not by the current
program.

If a class object may is volatile, only its volatile member functions may be
used.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xffc Thread 0x228 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 0 03-30-2006 03:16 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 1 03-24-2006 04:20 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 0 03-24-2006 02:22 PM
Use of the Volatile keyword for a pointer to a volatile memory block ben C Programming 5 01-11-2005 05:38 PM
Re: Volatile? Knute Johnson Java 17 07-03-2003 03:31 AM



Advertisments