Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Allowed do nesting ......exceeded

Status
Not open for further replies.

Jerim65

Technical User
Aug 8, 2010
99
AU
I've been 'cleaning' up my projects files and when I did a 'build' I got the error
Allowed Do nesting or expression evaluation level exceeded.

Can anybody give me any clues as to how to find out why I get this error?

What to look for in what areas?

I get no error file from this.

Of course I can get no further with my project until this is resolved.

Coldan
 
Hi Coldan,

A likely explanation is that you have a method, function or procedure which calls itself. Or which calls another method, function or procedure which in turn calls the original one. And so on.

It can difficult to trace this sort of error. One possibility would be to eliminate parts of the application, one at a time, until the error goes away, but that will be laborious. Maybe someone else will have a better idea.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Mike,

this kind of recursion you describe exceeding the nesting level would only occur at runtime, not during a build.

The one thing that can recurse and cause this error durong a build is #includes. If a .h file includes another one, which includes the first one you exceed that limit.

So look out for includes. These can be in code with the #include precompiler directive or it can be a class "setting": If you modfiy a class or form you have a menu for the form or class and this has a menu item "Include File".

The first thing you should investigate though is the include files themselves, and what other files they include via an #include directive. Most likely the include recursion originates there.

Bye, Olaf.
 
Mike,

that's true and very kind of you. It could still be some other reason thatn #includes we both didn't think of yet. And it's no reason to not also check and follow your advice, there could be code in a project hook or anything else being triggered by a build which could have a recursion problem.

And last not least often enough I've misread and misunderstood questions, too.

Bye, Olaf.

 
Hi Mike and Olaf,

I had, some hours before, started adding classes for Bernard Bouts 'Windows Style' greying down during a Quit in my next project upgrade. I had add a new report and that's when I started the Build.

I added in some classes to do the greying...

Later I realised I had added them so removed them .. and that removed the problem.

Thanks to you both for your thoughts - I'll see what happens when I try and get that going again.

Coldan
 
Coldan,

It's sounds very much as if you've found the source of the problem. In general, if something is working, and then it stops working, you've got to figure out what you did in between.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top