Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can someone please explain:
Is there a rule or condition like when to use Rem Keyword vs // vs /* for commenting in a script? The reason I am asking this is all three serves the same purpose
Thanks!
Hi Karthick,
// is for single line comments.
Ex: // This is a comment.
/* …*/ is for multi line comment. Multiline comments are used to comment out block of code.
Ex: /* This is a comment
that spans two lines */
Rem is a short for Remarks. The rem statement is used for inserting remarks or comments or comment out the lines. Everything between the Rem and the next semicolon ; is considered to be a comment.
Ex:
Hope this helps.
True. I generally follow this:
Rem and // Is used for single line statement commenting.
/* */ This is used if you have many lines/a block of script statements to be commented in a single go.
Thanks,
Vish.
Hi Karthick,
// is for single line comments.
Ex: // This is a comment.
/* …*/ is for multi line comment. Multiline comments are used to comment out block of code.
Ex: /* This is a comment
that spans two lines */
Rem is a short for Remarks. The rem statement is used for inserting remarks or comments or comment out the lines. Everything between the Rem and the next semicolon ; is considered to be a comment.
Ex:
Hope this helps.
Thanks Vish Nagaraju that makes sense