Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / please help with syntax error.

Author
Message
Silent Knight
19
Years of Service
User Offline
Joined: 25th Jan 2005
Location: In Your Mind
Posted: 20th Aug 2005 19:52
i sometimes get a syntax error at the end of my program. the line highlighted is usually blank. my program often runs smoothly until i add some new things.

Also, what exactly is the cause of a nesting error?
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 21st Aug 2005 00:06
Nesting errors are caused when you put program loops inside other program loops and don't terminate the loops properly.

For example Do must be terminated with a Loop. For N must be terminated with the line Next N (although in reality, a harmless bug in DB means that you can have For N= ... Next P and it will still work).

If blocks must be terminated with Endif and so on.

The following code will cause a nesting error as the For M loop should be terminated with Next N - Not Endif as I have put.



TDK_Man

Login to post a reply

Server time is: 2024-11-27 18:40:50
Your offset time is: 2024-11-27 18:40:50