Page 1 of 1

Error E0030 problem and solution

Posted: Sat Apr 05, 2014 7:15 pm
by Roger Seiler
Using xHarbour.com's xBuild compiler, I was getting "Error E0030 Syntax error at '7'". It occurred at a FIELD declaration line, and I determined that '7' had nothing to do with it. The problem was that one of the fields listed had the name "IDNO" all in caps. As soon as I changed it to "IDno" - mixed case - then the problem went away. There was no variable declaration in any .ch files going into the preprocessor that conflicted to account for this. So it seems there can be case sensitivity and maybe some "magic words" that can cause problems.

Anyway, I'm just suggesting that if you get this E0030 error on some variable that is stated all in upper case, you could try changing the case from upper to lower of some characters to see if that will work. It worked for me. Don't know why.

Re: Error E0030 problem and solution

Posted: Sun Apr 06, 2014 6:37 am
by Antonio Linares
Roger,

Thanks for sharing it.

My advise is to migrate to Harbour, or at least, try to compile that code that fails with it, so you can see if there is a difference.

Re: Error E0030 problem and solution

Posted: Mon Apr 07, 2014 11:05 am
by Patrizio
IDNO is defined in winuser.ch

Re: Error E0030 problem and solution

Posted: Mon Apr 07, 2014 12:05 pm
by Roger Seiler
Thanks, Patrizio, regarding Winuser.ch . Mystery solved!

Winuser.ch is in ..xhb\include where IDNO is defined as 7, which explains why the error message I got mentioned 7.

Anyone using xHarbour should take a look at Winuser.ch in order to be aware of variable names that get defined there and which could conflict with one's own variable names. Fortunately, all names defined in Winuser.ch are in all-caps, so if every var that you name has a mix of upper and lower case, you won't have a conflict with names used in Winuser.ch .