On 12/7/05, geoff@collyer.net wrote: > > I like Ken's comment in A New C Compiler: > > Volatile seems to have no meaning, so it is hard to tell if ignoring > it is a departure from the standard. Const only confuses library > interfaces with the hope of catching some rare errors. Volatile is useful for telling compilers not to stick data in registers, which is helpful for multi-threaded situations with shared memory ... sometimes :) If I were to write a semaphore or another synchronization method using shared memory on unix I'd probably type volatile and then pray :). It often feels more of a faith issue than a knowledge issue though :) Const is ok, sometimes, in some languages [C++]. It's notoriously difficult to add const interfaacs to C++ classes as an afterthought. You have to go in "full const" or none at all. Adding it afterwards causes a great deal of pain tracking down all the places you needed const when you didn't put it there. It's like playing pick up sticks with your buttcheeks. - [I think] the late John Candy.