Good night,
in the e-book on page 163 “Creating the Web Page” you explain the keyword “PROGMEM“, but on line 21 of the main.cpp file we read: “const char index_html [] PROGMEM = R” rawliteral (… “
what does the “R” mean?
Thanks
Hi Ferdinando.
You are not the first person asking that. So, I think the explanation must be a little confusing. I’ll need to fix that in the next eBook update.
As for the R”rawliteral. The R means “Treat everything between these delimiters as a raw string”. That is, everything between “rawliteral”(at the beginning of the string) and “rawliteral”(at the end of the string).
Instead of the word “rawliteral” you can use any other word as a delimiter.
Let me know if this is clear. If not, I’ll try to explain in another way.
I hope you are enjoying the eBook.
Regards,
Sara
Hi Sara,
thank you very much, now it’s clear. Where can I find a list of these parameters? Thanks again.
Ferdinando
I’m refering to “R”.
Are there other parameters for PROGMEM like R?
I suppose PROGMEM is a directive to the compiler …
Thanks
Regard
Ferdinando
Hi again.
The “R” is not specific to the PROGMEM.
The “R” is one thing and PROGMEM is another. In this case, we’re combining both together.
The PROGMEM keyword is a variable modifier, it tells the compiler “put this information into flash memory”, instead of into SRAM, where it would normally go. You can learn more here: https://www.arduino.cc/reference/en/language/variables/utilities/progmem/
About the “R”, it allows you to spread a String on different lines using delimiters.
I hope this is clear.
Regards,
Sara
Hi Sara, now its very clear. I had forgotten the function of the PROGMEM keyword. Thanks.
Best regards
Ferdinando