C constants trace their ancestry back to when C had no types. Normally the const is a kludge that is not enforced, iow it is a normal memory storage location in which data is stored that has the 'const' attribute only in the compiler. Writing code that tries to write to a const variable (!) causes a compiler warning at most, and that can be overriden. This is sometimes used to create code that ensures that any writes occur only at controlled locations (generating specified tolerated warnings on compile), and nowhere else. (aside: this is an easy way to find out whether something is changing a variable that should not do so, while debugging code - obviously it will not catch a recast referenced access i.e. ptr=(int *)(const int *), but the cast itself should be caught by the compiler /aside). The other implication is that the compiler 'knows' that a const will not change and may use this to generate optimized or reordered code (even optimizing the variable away entirely into a compile-time only constant symbol - I believe that gcc -O3 does that). That can be prevented by using certain compiler flags around the section where the const variable is declared. On embedded systems some types of const (the ones located at a certain address with @ or linked into a segment mapped to eeprom etc) can be desirable, to use read-only values or non-volatile memory that gets updated by external factors. Here is an interesting discussion about const use with volatile (!): http://publications.gbdirect.co.uk/c_book/chapter8/const_and_volatile.html C is fun ! Peter -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist