Solved

VBScript question:  Multiline comments?

Posted on 2003-11-03
3
24,140 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

914 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now