VBScript comment

From StealthBot Wiki Backup
(Redirected from Vbscript comment)
Jump to: navigation, search

In VBScript, to write a comment, preceed a line with a ', or a single quote. The rest of the line can then be dedicated to writing anything you want, and the interpreter will ignore it.

Syntax

Any lines starting with or containing Rem (not commonly used, meaning "remarks") or ' are comments. Comments can be used to explain code or write whatever you want.

VBScript does not have multiple line comments like many well-known languages. You can place a comment after a valid line of code, but you cannot "end" a comment to put one before a line of code.

Example

' This is a comment
' This code will eat your soul.
' Not. :)

Summary

Comments should be used to tell future readers of your code what your code does. This is called "documentation" and is pretty important in the real world of programming.

See also