We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi there! At present I am writing a program in C51 that might be available in different language versions one day. So I place all texts in one file called texts.h. That file looks like [...]
#define OK_STR "ok" #define CRLF_STR "\x0D\x0a" #define MODEM_STR "Modem"
Why don't you try it yourself? It should not be too difficult. I am using C166 toolset and I remember an occasion when compiler (or linker) merged identical strings in my program. I noticed that because the program modified them (everything was in RAM) and after modification of one of the strings I could see the other one modified as well. I can't say if it was linker or compiler (common tail merging) optimization because everything was happening inside one module. So there may still be hope. Regards. Mike.