A
Andrew
Hello,
I have been doing some microprocessor programming, and I have run into
some variations in the way people use the semi-colon. Please tell me
the difference between these two statements.
1. while(1)
{
value = read_adc(1);
}
2. while(1)
{
value = read_adc(1);
};
Is the semi-colon on statement 2 doing anything? The code seems to
run the same both ways. I just don't understand the purpose of using
a semi-colon where this is no statement. Please explain.
thanks,
Andy
I have been doing some microprocessor programming, and I have run into
some variations in the way people use the semi-colon. Please tell me
the difference between these two statements.
1. while(1)
{
value = read_adc(1);
}
2. while(1)
{
value = read_adc(1);
};
Is the semi-colon on statement 2 doing anything? The code seems to
run the same both ways. I just don't understand the purpose of using
a semi-colon where this is no statement. Please explain.
thanks,
Andy