Please document Serial.printf() in Arduino Language Reference

Continuing the discussion from Can you enable printf on R4?:

Thank you to whoever added Serial.printf() as a standard function (at least on the Pico). Since it's a compiler thing shouldn't everybody get it?
It popped up as a Serial. option with:

EFP3 - Add printf() to make life so much easier...

I agree. But it's not in the language reference yet and when I first looked it up I was directed to a massive class library monitor_printf

So glad it's just a normal function finally. It's been on my wish list for years. Now get it documented so everyone can use it.
We've got

Who can make
https://www.arduino.cc/reference/en/language/functions/communication/serial/printf/

Arduino has intentionally decided not to implement printf in the Arduino Print class:

https://groups.google.com/a/arduino.cc/d/msg/developers/E0pUPWeDE2Y/GPWl9Nw1BwAJ

Massimo Banzi Feb 13, 2019, 1:26:42 AM
to Arduino Developers

Honestly I would avoid adding printf to Serial., the syntax is not very friendly.

People who know how to use it can use sprintf and pass the buffer to print.

The developer of each Arduino boards platform is free to add any code they want to their core. Some of the 3rd party platform developers decided that they did want to add a printf function to the Print class, so you will find it is available when using certain platforms.

However, this is not part of the official Arduino API and so will never be documented in the official Arduino documentation. The 3rd party platform developers are responsible for documenting the variances in their core from the standard API.

That logic seems flawed to me. He might just as well have said

The syntax of printf is not very friendly but people who know how to use it could use it

4 Likes