Solved

VBScript question:  Multiline comments?

Posted on 2003-11-03
3
25,163 Views
Last Modified: 2010-10-05
I know how to do a single-line comment in VBScript:

'This is a comment

Usually when I do multiple lines I just begin each line with a single quote:

'This is comment line 1
'This is comment line 2
'...
'Comment N...


Is there a multiline comment format (as found in other languages)?

As in:

/*Comment line 1
Line 2
Line 3
Line 4
Line 5  */

(Everything between the /* and the */ is marked as a comment.



Just wondering if VBScript has the same sort of thing, and I missed it.


Tom
0
Comment
Question by:knowlton
3 Comments
 
LVL 58

Assisted Solution

by:Gary
Gary earned 60 total points
ID: 9672959
No you have to comment each line out or use comment tags like this
<!--
sadfds
sdaf
dsf
-->
0
 
LVL 12

Accepted Solution

by:
kingsfan76 earned 65 total points
ID: 9672990
not that I know of.  I don;t think there is a direct way.
you can sort of use the html comment to comment out a section:
<%
........  'some codes
%>
<!--
<%
........  'comment out codes
%> -->

in VB.NET the syntax for comment out a section of codes is added.
0
 
LVL 4

Expert Comment

by:Iguanasan
ID: 9673019
VB Script does not have multi-line comments.  Either use the single quote ' or the REM statement.

' This is my comment
REM And this is a comment too.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question