Unfortunately, static has several different meanings, depending on where it appears.
In this case, the static keyword is used to make sure that no other files can see the variable name "c". It allows you to use a simple name and only worry about name collisions within that file. Without the static keyword, the name "c" for a const char array could not appear in any other file. The linker would complain about "multiple definitions". In general, it should be used for any file-scope variable that is not intended to be accessible outside the file.
When used inside a class declaration (e.g., the H file), the static keyword on a data member means that all instances of that class share that "static" member. Without the static keyword, each instance has its own copy of that member.
As a senior desktop programmer, of course I understand the meaning and usage of static, but not in this context with PROGMEM (allowed to be used by AVR-GCC , for modified Harvard architecture, MCU specific, AVR in this case). It is really weird construction for me.
This can be found in NeoGPS lib, the author is the member /dev, if I have calculated 1+1 correctly.
Heh, heh, I knew what you meant by "some libs"....
I understand... static, but not in this context with PROGMEM
To be clear, the static keyword is independent from PROGMEM. static does what it has always done: limit the identifier (i.e., "name") scope to that file, regardless of where it's stored (RAM or FLASH).
The __PROGMEM form is from Cosa, an excellent Object-Oriented alternative to the Arduino framework. I was trying to maintain the same code base on both systems. The author of Cosa (properly) used the double underscore to indicate that this "keyword" (actually a #define) is compiler-specific. Experienced programmers would immediately recognize it as such.
It also helps isolate Cosa from changes to this keyword by the Arduino gods.
Cheers,
/dev,
who was nervously waiting for the finger of blame to be pointed.