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 / Edit Command

Author
Message
Grog Grueslayer
Valued Member
18
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 23rd Jul 2005 06:34 Edited at: 23rd Jul 2005 06:43
I discovered this while writing a long nested for next loop. I had it all working great and I added some lines in the middle. I tried to run it and it had an error (like there was a nesting problem). I checked... double checked... tripple checked. Everything should of worked. I then went line by line to see if there were any other problems (like not enough brackets)... there were no other problems.

I went down the code again this time using the arrow keys and looking at each character. I noticed at the end of a "exit" command there was a space. I deleted the space and it went through without errors. It was in a for next loop. Since the help file on exit didn't mention a for next loop I figured that it may be me not using exit properly. I tried it with other loops (that were in the help file) and got the same errors. I'm using the latest update of Darkbasic Pro 5.8 and BlueIDE.

I tested this same code in the editor that came with Darkbasic Pro and found that it does show the error but only if you put a space after exit right before compiling the code. Once the error is found it's on a different line and therefore erases the space by "exit" so the program can be again compiled and work error free.

This code has a space by every "exit" but if you use the original Darkbasic editor you'll have to add a space to one line and compile (without moving to another line). If you use BlueIDE it should show an error right away (BlueIDE keeps the code exactly the way it was written).

Also adding a rem statement on the same line as exit makes it work fine.



Edit: I just noticed I typed "Edit Command" instead of "Exit Command" on the title... can any mods change it.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 25th Jul 2005 22:42
Yep - it's less likely to appear in the default editor, but can still happen.

Whether this is a compiler problem, or an editor problem depends on which is responsible for dealing with those trailing spaces. I suspect that this bug may be later rejected, *if* the requirement was for the editor to remove them.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
Keaz
20
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Somewhere in south Texas
Posted: 4th Aug 2005 02:59
Hmmm.. I'm glad I checked the bug reports. When I make my editor I can "fix" this one if it is indeed an editor bug.

Breaking Stuff=Fun!,Bug Testing<>Fun!, Bug Testing=Breaking Stuff, so...
Bug Testing=Fun! Hmmmm....
DOES NOT COMPUTE! SYSTEM MALFUNTION!
Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 2nd Oct 2005 04:09
Looks like this only happens when having multiple blocks of code on the same line. Will revisit this after 5.9 has been released.

Login to post a reply

Server time is: 2024-03-28 15:10:02
Your offset time is: 2024-03-28 15:10:02