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.

Bug Reports / IF THEN ELSE Bug

Author
Message
pcRaider
16
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 29th Nov 2007 11:24
use "Then" that make a mistake.



Jeff032
16
Years of Service
User Offline
Joined: 13th Aug 2007
Location:
Posted: 9th Dec 2007 21:16 Edited at: 9th Dec 2007 21:20
You are using the ELSE command incorrectly (in my opinion of course, as is all of this post). It is not meant to be used in the middle of a line like you are using it. It is meant to be at the start of a new line.

So in this case (putting everything on one line), you just put a colon before else, and both snippets work.





This is not a bug in my opinion, just incorrect syntax that the compiler trips over. (Which I guess we could call a bug - it should not compile in the first place)

[EDIT]
Upon looking at the other post.....that's interesting.
I feel that a colon should be required even when there is only 1 command before the ELSE

Dabbler
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: Minnesota
Posted: 10th Dec 2007 15:15
Quote: "
You must always use an ENDIF to mark the end of the ELSE command sequence.
"


Thats right out of the DBPro help file.


Whatever...
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 11th Dec 2007 14:29
Quote: "The two valid syntaxes are:"


That's nice and clear. Shame the first isn't described properly in the Help file.

Do "bugs" still appear if you stick to one of those two forms of the syntax - or are the "bugs" a consequence of not following the syntax correctly?
pcRaider
16
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 12th Dec 2007 12:19
About this.
It is the most popular command.
By other BASIC languages, this works normally.
Even DBC works normally in the same way.
It is only DBP that do not work.
I want you to work in DBP.

Login to post a reply

Server time is: 2024-04-25 01:38:59
Your offset time is: 2024-04-25 01:38:59