eblc1388
Active Member
Hi,
What is the middle parameter suppose to do in the FOR loop definition in the following code? Usually it is the upper limit for the loop variable but this construct is a little different from others.
What is the middle parameter suppose to do in the FOR loop definition in the following code? Usually it is the upper limit for the loop variable but this construct is a little different from others.
Code:
#include <io8515.h>
/* This seems to produce the right amount of delay for the LED to be
* seen
*/
void Delay()
{
unsigned char a, b;
for (a = 1; a; a++) // <<<<<<<<
for (b = 1; b; b++) // <<<<<<<
;
}
void LED_On(int i)
{
PORTB = ~BIT(i); /* low output to turn LED on */
Delay();
}