volatile const ??
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2010-08-16 10:04 PM
Posted on August 17, 2010 at 07:04
volatile const ??
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5:02 AM
Posted on May 17, 2011 at 14:02
So that it is actually re-read every time (think hardware registers).
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5:02 AM
Posted on May 17, 2011 at 14:02
''What is the purpose to make a constant volatile''
'const' does not actually mean that it's a constant - it just prohibits writes''if it can not be changed anyways ?'' It cannot be written by the program - but that does not mean that its value will not change! As already noted, think of a read-only hardware register...Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5:02 AM
Posted on May 17, 2011 at 14:02
There is a good series of articles by Dan Saks about const & volatile.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5:02 AM
Posted on May 17, 2011 at 14:02
const
volatile
''The semantics here indicate that the register's value is read-only but not necessarily unchanging.''http://en.wikipedia.org/wiki/Const-correctness#Volatile-correctness
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
