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 / IF Statements

Author
Message
Scrum
20
Years of Service
User Offline
Joined: 23rd Mar 2004
Location:
Posted: 26th Mar 2004 01:24
What's the syntax for something like this:

IF <condition> THEN
<action>
<action>
<action>
ENDIF

It would seem that I answered my own question with my sample but it doesn't compile correctly. It keeps giving me errors when I end a bunch of actions inside of an IF statement with ENDIF
hyrichter
20
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 26th Mar 2004 01:27
When you have an If Endif statement, you don't use then. It took me a while to get used to

So it's
If <condition>
<action>
<action>
endif
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 26th Mar 2004 01:38
And if you want it on one line then you need the THEN,

If <condition> then <action>
Scrum
20
Years of Service
User Offline
Joined: 23rd Mar 2004
Location:
Posted: 26th Mar 2004 01:52 Edited at: 26th Mar 2004 01:54
Ok another question, why wont it print the info in my collision array properly?

(this is only a small snippet of code)

EDIT: I know I spelled cursor wrong, oops

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 26th Mar 2004 02:10
good ol' dbp syntax for ya



Home of the VB.NET Class Builder Utility - Demo available now!

Login to post a reply

Server time is: 2024-11-26 09:53:21
Your offset time is: 2024-11-26 09:53:21