Looking for a complete ref for "Arduino Lang

Hi There appears to be many partial Arduino Lang references. Is there a book or PDF that gives examples of EVERY language function. For example finding info on Strcat() is not easy (for Arduino) yet it is an allowable function.

Thanks Al

I'm not aware of any complete list of examples, but the Arduino language is just C/C++ with a set of libraries simplifying the using of the Arduino hardware. So you should be able to find many examples for C on the Internet using a suitable search engine.

For just a list over the functions you can use, in addition to the one you find in the Arduino language reference, you can look at avr, it's the C/C++ compiler used in Arduino You can find the complete library reference for avr here; http://www.nongnu.org/avr-libc/user-manual/modules.html

Thanks. Makes sense. However some references caution against using C with all it’s full power stating “the Arduino compiler may not like all the C functions”. Is this true? How does a coder know when a C construct is legal and when it is not? Al

AFAIK the C language and standard library is fully supported.

There are holes WRT C++ run-time features. A general rule is that nothing having to do with heap or complex storage management is supported. That especially concerns the NEW feature for objects...

This is good news indeed. I know C so this helps. Odd thing is that many web resources give conflicting statements regarding C compatibility for Arduino so this was confusing. Thanks for the assistance!


You won't get very far using "printf" either.


But of course, "printf" isn't part of the C language. ;)

Didn’t someone say:

AFAIK the C language and standard library is fully supported.

and isn’t printf part of the standard library?


A very good point! I wonder who that "someone" could have been? The C "standard library" is somthing like this: http://www.utas.edu.au/infosys/info/documentation/C/CStdLib.html There are of course issuse with stdio, as there is no file system on the Arduino. A half-hearted approach is Serial.print. fprintf also is also part of stdio, so there are gaps, but I think only WRT stdio.

On the other hand, sprintf is not really so much code for an 328 http://www.koders.com/c/fid3AC8D1F6C2005901963D4FF6C48848854998406F.aspx.

Very interesting thread and shows that there is a need for a clear document that outlines what is C-legal and not for Arduino. For some reason there is no single doc (if so, where?) that outlines what seems to be fundamental to working with Arduino via the IDE. Sure there are the Ref pages for the Arduino Language but these are mainly focused on the basics and do not include the many aspects of C (not all as this thread shows) that are also legal. -- Al

I approach coding from the other direction, I guess. I assume that if it’s not documented as unusable (or, like fopen, clearly not supported), I can use a function. Usually, I can.

Where then is the list of undocumented C functions for Arduino that coders should avoid? Sure some coding experts have a feel for what is likely not to work. What about for someone new to Arduino? -- Al

If the compiler doesn't like something, you can't use it. Or, you haven't included the proper header file.

If you can't find the proper header file, you can't use it.

Thanks Paul