Program lines can begin with an optional line label. Line labels must either be a valid variable name (e.g. label1) or an integer literal (e.g. 100). Line labels must always be followed by a colon (:). The label and colon can optionally be followed by a standard statement. [In VB6 and some other version of Basic, no label separation character was required.]
The standard line is formatted as follows:
Label: Statement ' Comment
An apostrophe (') marks the beginning of a comment. Comments can follow a standard statement on a line. Full line comments and blank lines are permitted.
Lines that begin with a # character are ignored. This is useful for defining "#Region" and "#End Region" lines that mark blocks of code that can be expanded or collapsed using the outlining feature of an editor.
Only one statement is permitted per line but a single statement can be continued on multiple lines. To continue a line, the end of the line must contain a space character followed by an under bar (“ _”). Comment lines cannot be continued and lines cannot be broken at certain points (e.g. in the middle of a variable name).
There is no termination character at the end of a statement.