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 / [DBP 7.6] Exit for loop problem. If [condition] then EXIT causes a compile error

Author
Message
Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 25th May 2011 13:24 Edited at: 25th May 2011 13:28
The following code returns this compile error: "Command out of place at line 28." - if a = 1 then exit, which is in a for loop in another loop. This occurs with a for loop in a do loop aswell.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 28th May 2011 00:04
I agree. I get the same problem with U7.7RC7.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th May 2011 13:08
This looks like a bug that has been uncovered (not caused) by the new IDE.

Take all of the extra spaces off of the end of the line 'if a = 1 then exit' and that code will compile.

(The original IDE removed extra trailing spaces from all lines).

Or you can comment out the extra spaces and it works too.

Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 28th May 2011 21:27
Ok, thanks. Will try.
sladeiw
14
Years of Service
User Offline
Joined: 16th May 2009
Location: UK
Posted: 8th Nov 2011 01:12 Edited at: 8th Nov 2011 01:13
I encountered this bug earlier and found the thread while checking if it had been reported. I don't know if the exact cause/effect has been determined but the example above isn't 100% clear. It seems that if there are spaces after the `exit` command then the next line of code is completely ignored.



Using U77 RC7.

Login to post a reply

Server time is: 2024-04-25 00:35:14
Your offset time is: 2024-04-25 00:35:14