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.

DarkBASIC Professional Discussion / remark at end of lines

Author
Message
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 21st Mar 2014 23:27
As my project slowly progresses and line count is ever higher, now suddenly the compiler is complaining about my comments.

myVar = myVar + 1 // increase myVar will give me an error similar to "could not determine parameter type of '1 `````````r' at line x". However, placing a colon like this myVar = myVar + 1 : // increase myVar apparently solves that issue..

My question is if that is a common compiler error, and also why it suddenly decide to appear now after nearly 10k lines of code when it never did previously?

IS that a game, a program, or 3 year old drawing.
tiffer
19
Years of Service
User Offline
Joined: 6th Apr 2006
Location: Scotland
Posted: 22nd Mar 2014 00:51 Edited at: 22nd Mar 2014 00:53
because '/' can also be used for carrying out divisions.

Edit: better off using `

I think they only put in '//' later on because they wanted to be more like C++. It's a bit of an oversight really.

Cwatson
Mobiius
Valued Member
22
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 22nd Mar 2014 01:50
What tiffer says. I always do
Quote: "sdfgh : '"
just for safety reasons.

pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 22nd Mar 2014 03:46
Comment

rem -- A compiler recognizes this as comment.
` -- A compiler recognizes this as comment.
' -- IDE converts this into REM.
// -- IDE converts this into REM.

` --- This does not have a mistake.

windowsXp
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 22nd Mar 2014 10:06
So it is a common error, maybe depending on the IDE.
And it only appear now because I was lucky it didn't before, if I understand you correctly.

IS that a game, a program, or 3 year old drawing.
tiresius
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 24th Mar 2014 05:56
I've only ever used ` character in many IDEs, I suggest you use the same for inline comments.

Login to post a reply

Server time is: 2025-05-14 13:10:15
Your offset time is: 2025-05-14 13:10:15