2010-08-16 10:04 PM
volatile const ??
2011-05-17 05:02 AM
So that it is actually re-read every time (think hardware registers).
2011-05-17 05:02 AM
''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...2011-05-17 05:02 AM
There is a good series of articles by Dan Saks about const & volatile.
2011-05-17 05:02 AM
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