COMMENT command

Adds an explanatory note to a script without affecting processing.

Syntax

Single-line comments

COMMENT comment_text

Multiline comments

COMMENT 
  comment_text 
  <...n> 
<END>

Note

Do not use a caret character ^ to preface lines of comment text. The caret has a special use in the .acl project file, and comment text is not saved if you preface it with a caret.

Parameters

Name Description
comment_text

The comment you are adding.

  • single-line comment enter the entire comment text without a line break
  • multiline comment enter as many lines of comment text as necessary starting on the line immediately following the COMMENT command

    Terminate a multiline comment with the END keyword on a separate line, or with a blank line.

END

optional

The end of a multiline COMMENT command.

If you use END, it must be entered on the line immediately following the last comment line. If you omit END, a blank line must follow the last comment line.

Examples

Single-line comments

You use single-line comments before commands to add documentation for future users who will maintain the script:

COMMENT Generate the standard deviation and average. 
STATISTICS ON %v_amt% STD TO SCREEN NUMBER 5 
COMMENT Create fields for storing standard deviation and average. 
DEFINE FIELD Standard_Dev COMPUTED STDDEV1 
DEFINE FIELD Average COMPUTED AVERAGE1

Multiline comment

You begin each script you write with a multiline comment that explains the purpose of the script:

COMMENT 
  This analytic identifies multiple records having common 
  transaction originator IDs (like vendor ID or merchant ID) 
  where the transaction date values are either equal or one day apart. 
  This analytic can be used for split invoices, split purchase orders, 
  split requisitions, and split corporate card transactions. 
END

Remarks

When to use COMMENT

Use COMMENT to include information about the purpose of a script, the logic used, and other information such as the required inputs for the script and the purpose of each variable you define.

The comments in a script are written to the Analytics command log each time the script runs.