Unexpected output when converting to an integer with int()

mrburnette:
... and if you programmed on a PC or minicomputer in C, then C++ for microcontrollers is even more distant.

Actually, since then a little bit with Linux, but mostly on a SPARC (Unix) !

Underneath the Arduino GUI is the AVR GCC compiler:
http://www.avrfreaks.net/wiki/index.php/Documentation:AVR_GCC#Getting_started_with_AVR-GCC

There is also the AVR-LIBC library that is available:
AVR Libc Home Page
and use with Arduino introduced here:
http://arduino.cc/en/Reference/UsingAVR

Things to keep in mind:

  • You can generally swing between Arduino'ish commands and C++ commands
  • You can resort to extern C {} or you can do inline assembler as advance coding.

Thank you very much! Should keep me busy for a while!

The compiler does a tremendous amount of optimizations ... sometimes taking out some of your code or even rearranging it. Never assume. If you really want to know what happened, you can get the assembler source with just a little work.

Very nice! Hope to learn about this too!

IF you are using Windows, you can also get information on the Flash and SRAM usage of your code with a little scripting:

May be a reason to check out windows ..., wonder if it can also be done on a Mac? A very quick online search
seems to show that it can (again, Arduino Cookbook, Chap. 17).

Thank you for all the suggestions. Looking forward to reading about all of this!