Hi All, I am newbie in this. Is this function declaration right, as it has bit as parameter, void myfunc(unsigned char,bit);
Ashutosh
No, the compiler will not detect if it's right or not - ie, if it does what the programmer intended - the compiler will just determine whether it is valid syntax or not.
The classic example is, of course:
// Test if 'a' is equal to 'b' if( a = b ) { // The test is valid syntax, but does not match the // programmer's intention stated in the comment! }
Yes, this is such a common mistake that many (most?) compilers today will warn about it - but compilers cannot possibly recognise every mis-application of correct syntax!
http://www.keil.com/support/man/docs/c51/c51_le_bit.htm