Well, my C-Textbook says
for (unsigned int i = 50;i;i--) blink(123);
CARM don't like it. What's the reason?
Are you sure it's really just a 'C' textbook, and not a C++ textbook?
Otherwise, definiing the counter inside the 'for' clause must be one of those new-fangled ANSI updates not supported by Keil - see: http://www.keil.com/product/isoansi.asp
What's the reason?
Including variable definitions in the for statement was not part of the original C specifications. It is allowed in C++, and in newer C standards.
Also: Why are you using CARM ? It's an obsolete, discontinued product. Use the Realview compiler instead.
Yes, i tried to use Realview insted of CARM several month ago. I spend a lot of time, but i never managed it to run stable. Allways difficulties with printf entering the Abort Mode. There is a special file to be included which has to be adapted to my MCU ADuC7026. So i feeled so tired... :-)
Yes, that is in the nature of embedded systems!
Hi as Christoph Franck said does this CARM support C++ style programming because in C you really can't declare any variable after initial declaration phase i.e. you can't declare it in "for" statement itself