Another Quick Question re: Commenting out...

Discussion forum for G-Force users

Moderators: BTT, andy55, b.dwall, juxtiphi

Post Reply
User avatar
JayPro
Posts: 738
Joined: Sat May 01, 2004 10:51 pm
Location: Huntington Station, Long Island, New York

Another Quick Question re: Commenting out...

Post by JayPro »

Of the two types of commenting out one can do, can it be said that the doouble slash kind is meant for a comment of one line, whereas the other is meant for longer ones?

For instance:

//Is it okay for me to do it this way
and it will still work?

or

/*Is this the way something like this
is supposed to be commented out?*/

otherwise you'd have to // for each line?

Or doesn't it matter?

ethan_greer
Posts: 17
Joined: Mon Nov 08, 2004 10:38 am
Location: Northeastern Ohio

Post by ethan_greer »

If it's like C, which I assume it is, the double slash (//) comments out everything until the next carriage return. Whereas the slash-asterisk (/* */) comments out everything between the starting and ending characters.

Long story short, for one line comments, you can use the double slash. For more than one line, use the slash-asterisk.

Post Reply