F() function documentation?


#1

I’ve seen some code examples using a function called F(), like in:

Serial.print(F(“Hello”));

I couldn’t find any documentation or reference to this, though.
What does this function do?

Thanks
André


#2

There is no documentation for that here since it’s not needed in the Particle world.
This is a mere legacy macro for compatibility with Arduino code.
On Particle it is transparent/vanishing

#define F(x) x

If you want to know what this is supposed to do on the Arduino side, here is a forum thread that addresses that
https://forum.arduino.cc/index.php?topic=91314.0