"bool" works... I use it all the time.
I would add, however, that K&R is probably beyond the comprehension of most C programmers and 99.99% of the arduino community. Without years or programming, making mistakes and tracking down those nasty bugs, it is not possible to appreciate it fully.
Quote from: fungus on Nov 23, 2012, 04:46 pm"bool" works... I use it all the time.Yes, so do I. Why would you even want to use "boolean"? But try "boolean" (which is the "standard" in "Arduino Language") on a C/C++ compiler and see what it thinks of it! (Probably much the same as what I think of it, actually.)And why is "boolean" supposed to be any easier for a beginner than "bool" anyway? It's introducing difference for the sake of difference! Madness.
In any case I don't think it is unreasonable to alert beginners, casual observers, and the unwary generally, to the differences.
... is to make sure that beginners be made aware that they are not choosing to take the true path towards C/C++ priesthood by using the arduino IDE?
[What would you suggest be a nice concise and accurate 'standardized' response one should post when a beginner asks "what programming language is the arduino using"? One sentence would be nice if possible, and no nerd words would be helpful.
The purpose to all my 'arguments' is to critically examine the claim that "there is no 'Arduino Language' -- it is programmed in C++".C++ is a standardized programming language. "Arduino language" varies, and in some places varies considerably, from that standard. That's why I think calling it a "dialect" is most appropriate.
If I had to recommend a book to learn the language the obvious choice is a C++ book.
A C book doesn't work either, because you'd be missing out on some of the best improvements of C++ over C.
There is plenty of time later on to learn about all the 'improvements' of C++ over C. And also some of the things that didn't turn out so well...
Quote from: retrolefty on Nov 23, 2012, 05:34 pm[What would you suggest be a nice concise and accurate 'standardized' response one should post when a beginner asks "what programming language is the arduino using"? One sentence would be nice if possible, and no nerd words would be helpful. How about:"The 'Arduino Language' is a dialect of C/C++ that attempts to make programming simpler for the beginner at the expense of not being completely standard. Refer to this _web page_ for a summary of the important differences from standard C/C++. This will be particularly helpful if you already have experience with programming in C/C++ on other platforms."Something like that. Someone has to write a _web page_, though.
I think the book is clear and simply written
QuoteI think the book is clear and simply written Come back in 10 years and see if you still think so,
If I start finding it hard to understand after 40 years, I will put that down to dementia, rather than the quality of authorship having changed.
I can only think of one 'big' feature that should never be used under any circumstances - C++ arrays (ie. new and delete) - ick!
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16