Hi! I'm a newbie with using Keil C-51 Compiler! I want to compile a sourcecode and always recive Error 107 unbalanced #if-endif controls! I've looked to all statements and i can not find any mistakes! There is another one! Error 106 unclosed comment! In the compiler discribtion is written: it occurs if there is a '*/' missing, but i don't use comments like this /*--*/ only // comments! because if i am using this /*--*/ type the there is apearring another Error: like this error 141 in line ... near '/' please could anybody help me or give me an advise which is probably wrong! Thanks DANIEL
Error 107 unbalanced #if-endif controls! I've looked to all statements and i can not find any mistakes! That one is one of those that has cost me the most pulled out hair. Usually, after I have given up, I find that it is in - or an interaction with - an included file. My debugging method, after I have decided "I can not find it", for this is to comment out first the includes, then if to endif sections till I get it. This, of course will give umpteen compile errors, but during this process the only one to look for is "unbalanced". When I comment out sections for debugging, I always use something like //qwerty--, that allow a global 'replace with nothing' when the bug is found. good hunmting Erik
"Usually, after I have given up, I find that it is in - or an interaction with - an included file." That's where you need the preprocessor listing!