| ??? 09/12/02 13:38 Read: times |
#29073 - RE: Define Vs Constant (Andy) |
luca ubiali wrote:
"I'm interested in opinions on this: do you believe that a variable with a const qualifier should automatically go in code? Maybe make this an option?" No, No !!! I use often the const qualifier for data. E.g. If I implement a timer interrupt, only the interrupt can change time and date. All other functions can read the actual time information, but since it was declared as const, no function can alter accidentally time and date. Also an ADC interrupt was the only instance, which can update the array of the 8 input values. All other functions can only read the ADC values. Its true, that all data on the code space are const at the same time. But the reverse relation don't exist. Peter |
| Topic | Author | Date |
| Define Vs Constant | 01/01/70 00:00 | |
| RE: Define Vs Constant | 01/01/70 00:00 | |
| RE: Define Vs Constant | 01/01/70 00:00 | |
| RE: Define Vs Constant (Andy) | 01/01/70 00:00 | |
| RE: Define Vs Constant Luca | 01/01/70 00:00 | |
| RE: Define Vs Constant (Andy) | 01/01/70 00:00 | |
| RE: Define Vs Constant (Luca | 01/01/70 00:00 | |
| RE: Const in code | 01/01/70 00:00 | |
| RE: Const in code, Andy | 01/01/70 00:00 | |
| RE: Const in code, Andy | 01/01/70 00:00 | |
| RE: Const in data, Luca | 01/01/70 00:00 | |
RE: Const in code, Luca | 01/01/70 00:00 |



