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 / #Constant / Comment Bug

Author
Message
Keaz
20
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Somewhere in south Texas
Posted: 4th Aug 2005 03:14 Edited at: 4th Aug 2005 03:15
Doesn't work:

Does:

I would say bad programming on my part but, this works as well.


The problem as I see it is #Constant does recognize "`" as the start of a comment, but does recognize ":" as the end of the command.

Breaking Stuff=Fun!,Bug Testing<>Fun!, Bug Testing=Breaking Stuff, so...
Bug Testing=Fun! Hmmmm....
DOES NOT COMPUTE! SYSTEM MALFUNTION!
Xolatron old
20
Years of Service
User Offline
Joined: 25th Jan 2004
Location: The Star Forge Language: DBpro
Posted: 4th Aug 2005 18:29
Yes, constatns are taken quite literally. Unfortunately, their 'literalness' ends at a space or ':'.

-Xol

Keaz
20
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Somewhere in south Texas
Posted: 5th Aug 2005 22:44
It should also end at '`'.

Breaking Stuff=Fun!,Bug Testing<>Fun!, Bug Testing=Breaking Stuff, so...
Bug Testing=Fun! Hmmmm....
DOES NOT COMPUTE! SYSTEM MALFUNTION!
Xolatron old
20
Years of Service
User Offline
Joined: 25th Jan 2004
Location: The Star Forge Language: DBpro
Posted: 5th Aug 2005 23:27
Agreed. This should be easy to implement if it stops at a space or ':'

This probably should be confirmed; I've seen many people post code with this and wonder about the problem.

-Xol

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 8th Aug 2005 13:56
Sorry guys, but the bug is in the third example.

#constant is a command. ` is a command. Assignment is a command. Commands are separated by colons when they appear on the same line.

The only exception to this is that comments always extend to the end of the line (ie, the colon is no longer 'special')

So I'm confirming this, but only because of the third example.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
Xolatron old
20
Years of Service
User Offline
Joined: 25th Jan 2004
Location: The Star Forge Language: DBpro
Posted: 11th Aug 2005 01:56
IanM,
I believe that the character ' ` ' is supposed to operate as ' :` '. There is so much code out there that uses a ' ` ' after a line without the ':' that it would cause mass chaos to make example 3 not to work. It would be more helpful if the command '#constant' would be changed to meet the standards of the rest of the commands (treating ' ` ' as ' :` '), rather than changing hundreds of commands to the more restrictive style of '#constant'.

Besides, if so many commands treat ' ` ' as ' :` ' (all except '#constant', as far as I know), I think that TGC intended ' ` ' to be treated the same as ' :` '. Also, why should '#constant' include comments from ' ` ', when there is no reason to; the user will never see the code after it is replaced. As you said yourself:
Quote: "The only exception to this is that comments always extend to the end of the line (ie, the colon is no longer 'special')"

Thus, comments are an exception. Most other BASIC languages treat ' ` ' as ' :` ', so why shouldn't DBpro?

-Xol

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Aug 2005 02:29
I just got through scanning old dicussions on comments, and it seems that your take on the backtick is right - check out Lee's post in this thread (it's the very last one)

http://forum.thegamecreators.com/?m=forum_view&t=38724&b=15

Either way, this post stays confirmed

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk

Login to post a reply

Server time is: 2024-03-29 06:54:46
Your offset time is: 2024-03-29 06:54:46