Whoa, this is a lot weirder than I expected.
Is there some "magic" involved in this line?
Code:
for ( x = byteswaiting ; byteswaiting == x ; x++ )
Its purpose is not at all obvious. Regardless of the value of
byteswaiting, the code in braces following the line will be executed exactly once. The variable
x appears to have no function inside the braces. I'll do it that way, but I have to assume there's something happening behind the scenes that isn't being explained.
I was always told that the
%d format specifier expects an
int variable, and that you had to cast
chars with
(int) in order to avoid problems. Is this not the case with EasyC's
PrintToScreen() function?
I'm also confused by the fact that you've named the function
main(). I thought that name was already taken. Is this another "magic" feature of EasyC that does something undocumented, or am I completely misunderstanding what's going on here?