I notice that the manual defines single (' or REM) and block (/* ... */) comments.
When I add either type to the end of a line it works.
Example: PRINT "This is a string literal." 'This is a comment
However, I notice that in the manual/help file, there is a colon placed between the line and comment.
Example: PRINT "This is a string literal." : 'This is a comment
There is no mention of having to place the colon other than being shown in the examples. Is it good practice in EBasic to use the colon or can we do without?
There is no need to use the colon in your example. The colon is used to write several statements in one line:
INT a : a=0 : a=a+1
Thanks fasecero.
I was hoping that there weren't any reasons to have to use colons between code and comments on the same line.
Paul
The colon is because in the old IBasic (and therefore CreativeBASIC) it was necessary to separate comments with a colon - my best guess would be that they are considered separate statements. However, it's not necessary in EBasic anymore.