I was reading the 'Detecting if a string contains a number' thread and spotted a function I did not know existed;
isDigit()
And I thought, that might be handy one day.
But then I thought, how many other handy functions are there; perhaps a reference book (as in a real paper book) would he a handy thing to browse through on occaision.
I did some Googling, found quite a few books on the 'Language' as expected, but there was no clue as to how complete they were.
I also found a couple of PDFs that appeared to be definative guides, but both were missing the isDigit() function, so one could imagine that there are paper books out there that are also not a complete reference. I am only really concerned with the ATmega328P\1284P\2560 processors.
So is there a book that is known to contain all the Arduino functions ?
So is there a book that is known to contain all the Arduino functions ?
No. The Arduino is programmed in C++ which is a super-set of C
isDigit() is a C function, not Arduino specific, so what you need are reference books on C and C++ not a book on Arduino functions which are decribed in the reference section of this site Arduino reference
For virtually ANY standard c/c++ function or keyword, all you have to do is: google c isDigit()
But if you don't know that the function exists, what then ?
Not that a reference book would be any better. What is useful is to type your query into Google
"detect number in C string" returns 126,000,000 results, not all of them helpful, I admit, but there is plenty that are. "arduino detect number" returns 10,5000,000 of which the first is a link to isDigit() in the Arduino reference
One problem that confuses the issue is that the Arduino reference includes some, but of course not all, of the available C functions and if you don't know that then you could be excused for thinking that it is a complete reference to the available functions, which it isn't
Regarding the Arduino core library API that you won't find documented in a general C++ reference, someone did post a PDF of the Arduino Language reference to the forum within the last two months. Unfortunately, I wasn't able to find it after some searching the last time someone asked about this.
There is also one that was posted a few years ago that is easy to find. That one was very outdated even at the time it was posted and is now horribly outdated so I recommend against using it.
You will find the same problem with any copy of the Arduino Language reference you find. Even the HTML copy bundled with the Arduino IDE is very outdated. The same will occur with any book you might find.
The language reference is regularly updated (well, not quite so much in the last year), so be careful that you're not getting outdated information.
I'm not sure how useful a reference book would be in this context. In pre-internet days when I worked as a C programmer, we had a couple of manuals that came with the compiler. But unless you were prepared to read (and memorize) the content, they weren't very useful for finding functions.
I did however come across a few while flipping pages to look something else up, that in my ignorance I had written my own version of.
of source there's no one book that describes all the libraries available.
that's why code reviews are so helpful; they expose you to new ways of doing things. You may not remember specifics but you remember there's a way to do things.
UKHeliBob:
But if you don't know that the function exists, what then ?
Then you google for what you're really trying to accomplish, and find another example. I do it all the time. There is more good information and example code available from a google search than could ever be put in any reference.
pert:
someone did post a PDF of the Arduino Language reference to the forum within the last two months. Unfortunately, I wasn't able to find it after some searching the last time someone asked about this.
I am well able to use Google to search for stuff, but that is not the point.
There are times, and I know this makes me sound a bit wierd, that I choose to disconnect myself from the Internet. At these times I like go back to old school stuff and browse through books.
If a good reference book were available, then I would likely buy one, if there is not then I cannot. But worth asking I thought.
A lot of improvements have been made to the Arduino Language Reference since the time that PDF was created (which was apparently significantly before it was posted to the forum in 2016, since I could see errors in the PDF I had worked to get fixed years before). Perhaps it was generated from the outdated HTML files bundled with the IDE. I'd say probably almost all the 1127 commits made to the arduino/reference-en repository came after that document was created.
Is the Help > Reference that opens in any version of the IDE up to date for that version of IDE always? If one has the current IDE is that Help > Reference in synch with the online version?
jubukraa:
Is the Help > Reference that opens in any version of the IDE up to date for that version of IDE always? If one has the current IDE is that Help > Reference in synch with the online version?
No. It's currently at least three years out of date: