Comments in Code

All through this manual you will see examples of ViviFire code with comments. Most of these comments start with an apostrophe (') and stop at the end of the line. You can also use two slashes (//) as an alternative. The ViviFire compiler ignores all Comments.

You put comments in your code to tell what other code does. And frequently they give other information.

There are two types of comments: the inline comment (given above) and the block comment. A block comment has two symbols that identify the start and end of a comment. Block comments can contain two or more lines. Although you can put block comments between elements in one line, it can make code not as easy to read.

There are two types of block comment. The first starts with /* and stops after */. The second starts with /' and stops after '/.

Examples

' This is a full-line comment
PrintLine "Test" ' This comment is inline with code
PrintLine "Hi " & name _  ' This comment
    & " how are you?" ' is divided in two
/' This is a short block comment '/
/* This is a long block comment
    that is divided across more
    than one line.
*/
Call Test 1 /'one'/, 2 /'two'/, 3 /'three'/

Recommended procedures for comments

The list that follows gives some general instructions about what type of comment can come before a section of code. These are only recommended procedures. Do what you think is necessary for you and all persons who will read your code.

Some more to think about: