A friend asked me what rom meant, when used as a qualifier, I did not know so I looked into it. I gathered, from what little documentation exists about this qualifier, that it simply puts it into the "rom" (program space) rather than the data space ("RAM") as a standard variable would be.
One question, why?
Why would you want something to be in the program space, surely this doesn't make it persistent across instances, does it?
Why would you want to do:
In which it's in program space and can only be read opposed to:Code:rom int = 5;
In which it's in the data space and only can be read..which goes further, since you can pack qualifiers onto a var declaration, to say, what happens if you do:Code:const int = 5;
It's already const by definition of the "rom" qualifier, and it's more or less "rom" by definition of the const qualifier (sure it's in the data segment, but it's still "read only").Code:const rom int = 5;
Information on this is scarce as ........ for some reason, most keyword, reserved word, or qualifier lists (as I checked all of them I could find) don't even list them, and some that do don't have any info for them (it's just a blank).
Anybody know what I'm missing here?