@Nick: I guess you're using arduino IDE 1.5.2!? I noticed that that version works for me while it was Arduino IDE 1.0.1 that gave me problems...

.@PaulS: thanks for making the memory usage a bit more clear to me. Maybe you can give me an example on how I could make a nice Get method to retrieve the data? Like I say in my signature, my background is more mechanical than software...

Best regards,

Alban

P.S. sorry for asking silly questions... I'm a mechanical engineer and not an electronics engineer

In the setter case, the argument is not modified, and since it is passed by value, anyway, I don't see the purpose of making it const. Can you explain why you would?

Documentation. As a general principle to make arguments you don't plan to change, const. Although admittedly since they are passed by value there isn't an enormous amount of point in this case. If you happened to be passing in a struct or something like that, by reference, marking it const makes it clear that although it might be possible to change it, you won't.

Quote

In the getter, I don't understand what is being made const.

You are promising to the compiler that this function does not modify anything in the underlying class (which a getter should not do, obviously). This may conceivably generate better code, and also catches errors (perhaps in a more complex function) where you have a brain fade, and the getter actually changes something.

Please post technical questions on the forum, not by personal message. Thanks!