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 / Help with code.

Author
Message
Monkeyfun
17
Years of Service
User Offline
Joined: 9th Jun 2007
Location:
Posted: 9th Jun 2007 20:14
I'm pretty new to DBpro, but I'm learning pretty fast. I'm making a joke operating system as some practice with BASIC code. It says "cannot close nest at line 43" (the end of the code).

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 9th Jun 2007 20:36 Edited at: 9th Jun 2007 20:38
1. Indent your code and you'll see straight away where the problem is! (Ifs with no Endifs)

Use this program if you don't know what to do:

DBA Tidy

2. Read some tutorials and learn about program layout NOW - before you go any further down your spaghetti code route - in particular the use of procedures and functions.

Tutorials For Beginners

3. Doing 2 will allow you to do away with the dreaded Goto command that are using - and is the source of most problems in the first place. It's lethal in the wrong hands!

TDK_Man

Monkeyfun
17
Years of Service
User Offline
Joined: 9th Jun 2007
Location:
Posted: 9th Jun 2007 20:40
Alright, thanks!
OneShot
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location:
Posted: 13th Jun 2007 03:56
I have always wondered...what's the difference between Goto and Gosub! Because you never say don't use "gosub" so I assume that gosub is alright to use! Omg it's driving me crazy!

Just started! Help!!!!

Login to post a reply

Server time is: 2024-11-25 17:57:53
Your offset time is: 2024-11-25 17:57:53