Identifier ',' not declared & project file issues

Discuss about beta versions of mikroBasic
compiler.
Post Reply
Author
Message
rackley
Posts: 550
Joined: 08 Aug 2005 17:47
Location: Livonia, MI
Contact:

Identifier ',' not declared & project file issues

#1 Post by rackley » 27 Mar 2006 22:44

I'm running into a lot of these errors lately:

Code: Select all

347:52 E-3 Identifier ',' was not declared vegnew.pbas
There is no error in the procedure call. Restarting the IDE does not fix it, but deleting all the files execpt for the project and code files fixes it. I think this may be because it's not recompiling the modules as it should?

I have a feeling it may be related to the problems that keep popping up in the project file. Example:

Code: Select all

[OtherFiles]
Count=9
Value0=D:\Program Files\Mikroelektronika\mikroBasic\vegnew\vegnew.pbas
Value1=D:\Program Files\Mikroelektronika\mikroBasic\vegnew\LCDInit.pbas
Value2=D:\Program Files\Mikroelektronika\mikroBasic\vegnew\MiscCompleted.pbas
Value3=D:\Program Files\Mikroelektronika\mikroBasic\vegnew\RelayValveLogic.pbas
Value4=D:\Program Files\Mikroelektronika\mikroBasic\vegnew\Buttons.pbas
Value5=D:\Program Files\Mikroelektronika\mikroBasic\vegnew\Consts.pbas
Value6=D:\Program Files\Mikroelektronika\mikroBasic\vegnew\Temps.pbas
Value7=D:\Program Files\Mikroelektronika\mikroBasic\vegnew\Buttons.pbas
Value8=D:\Program Files\Mikroelektronika\mikroBasic\vegnew\Consts.pbas
Value9=D:\Program Files\Mikroelektronika\mikroBasic\vegnew\Ignition.pbas
Value10=D:\Program Files\Mikroelektronika\mikroBasic\vegnew\Consts.pbas
Value11=D:\Program Files\Mikroelektronika\mikroBasic\vegnew\Ignition.pbas

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

Re: Identifier ',' not declared & project file issues

#2 Post by zristic » 28 Mar 2006 08:17

I would rather suspect that you are pulling similar sources from different paths. It is not likely that compiler compiles one module fine, but fails to do it with another.

Also, pay attention to naming convention. I noticed that you often give very similar names to your procedures-variables and it may easily confuse you.

The error above means you passed too many params to your function.

rackley
Posts: 550
Joined: 08 Aug 2005 17:47
Location: Livonia, MI
Contact:

#3 Post by rackley » 28 Mar 2006 17:18

There were not too many arguments for the function - as I said, deleting the .mcl files and allowing the compiler to recompile fixes the problem. I don't know why, but it does make the error go away.

On subsequent errors I have tried fixing the project file and it does not make the error go away - only deleting the .mcl files.

Regarding the project file, I now keep my backup files offline in backup sets via an online automated backup service, so there is only one copy of the source files I am using. This is in "D:\Program Files\Mikroelektronika\mikroBasic\vegnew\." Since there is only one set of source files, I don't see how it could be pulling them from different paths, or why it shows the same source files multiple times in the project file. Yesterday I had to go in and manually fix the project file twice..

The next time I see this I'll make a backup archive of my project and experiment to see if I can narrow down which .mcl is causing it.

rackley
Posts: 550
Joined: 08 Aug 2005 17:47
Location: Livonia, MI
Contact:

#4 Post by rackley » 29 Mar 2006 16:13

OK, focusing on the comma not declared error. I ran into it last night and again this morning. Deleting the .mcl for the module that contains the function and recompiling fixes the problem (with no changes in the code.) However, I haven't modified the function call or the module in days. Zoran, I'm sending an email to you with a project snapshot, hopefully we can figure out what's up :D

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

#5 Post by zristic » 30 Mar 2006 08:22

rackley wrote:I'm sending an email to you with a project snapshot, hopefully we can figure out what's up
Ok, I will have a look at it later today.

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

#6 Post by zristic » 30 Mar 2006 09:02

Ray,

I tried your codes and indeed, the error popued up. However, when I recompiled your libraries, the error never appeared again. I even restarted the compiler, deleted the sources (leaving only MCLS), but the error never appeared again.

My assumption is that you are either using an older version of mB, or you have multiple search paths where you placed old MCL files.

rackley
Posts: 550
Joined: 08 Aug 2005 17:47
Location: Livonia, MI
Contact:

#7 Post by rackley » 30 Mar 2006 15:08

That's exactly what happens for me. Once I delete the old libraries everything works fine. I'll go on and make a bunch of code changes (not related to the library(s) in question) and then a while later it will pop up again. Delete the libraries, recompile (same code) and it works fine.

I just checked and I'm running 4.0.0.2 as reported by Help-> About. The paths in the project file are all correct, as you can see. I just checked my system %PATH% and it only contains %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;, so it's not the culprit either.

Is there any way to find out why it isn't just overwriting those .mcl's with newer ones when it compiles? IIRC the compiler does give messages that the modules are being recompiled (at least some of them.)

I was hoping that with a "live specimen" you might be able to "dissect" where the error is originating :D Unfortuantely catching the compile before the one that gives the error is harder.. and that may be the one that actually causes the error to appear in subsequent attempts.

Thanks for looking into this btw :-)

Post Reply

Return to “mikroBasic Beta testing”