Comments in 4Test Files

You can embed single-line comments in all 4Test files: Any characters following // in a line are considered comments.

Note: Shift+Enter, which wraps lines of code, is not available for comments. You must insert double-slashes on the next line for run-over comments.

4Test ignores comments when compiling, with the exception of functions and test cases. Comments within functions and test cases must be within the scope of the function or test case. If a comment is outdented beyond the scope of the function or test case, the compiler assumes that the function or test case has ended. As long as comments do not violate the function or test case scope, they can be placed anywhere on a line.

Note: Comments beyond the scope can also impact expand and collapse functionality and may prevent a function or test case from being fully expanded or collapsed.

We recommend that you keep comments within scope.

Example

// iSeed is a random number generation seed
INTEGER iSeed = 10
RandSeed (iSeed)
Print (RandInt (0, 100)) // prints: 75
Print (RandInt (0, 100)) // prints: 79
Print (RandInt (0, 100)) // prints: 3