cmm

### Step 11: Add Comments

This step adds three comments into the routine.

Insert an Input Comment

An Input comment collects information from the operator and stores it in a variable.

1. Select Insert | Report Command | Comment to open the Comment dialog box.

2. From the Comment type area, select the Input option.

3. In the Comment Text box, type this text: Type your first name.

Comment dialog box with an Input comment

4. Click the OK button to close the Comment dialog box. PC-DMIS displays a COMMENT/INPUT command in the Edit window.

The comment has an ID of C1. During execution, the C1.INPUT variable holds the value that the operator types into the Input dialog box.

Insert an Operator Comment

An Operator comment shares information with the operator.

1. Select Insert | Report Command | Comment to open the Comment dialog box.

2. From the Comment type area, select the Operator option.

3. In the Comment Text box, type this text: WARNING: Machine is going into DCC mode!

Comment dialog box with an Operator comment

4. Click the OK button to close the Comment dialog box. PC-DMIS displays a COMMENT/OPER command in the Edit window.

Insert a Report Comment

A Report comment sends information to the report.

1. Select Insert | Report Command | Comment to open the Comment dialog box.

2. From the Comment type area, select the Operator option.

3. In the Comment Text box, type this text to use the variable from the earlier input value: "OPERATOR IS " + C1.INPUT

Comment dialog box with an Operator comment

4. Click the OK button to close the Comment dialog box. PC-DMIS displays a COMMENT/REPORT command in the Edit window.

For more information on comments, see "Inserting Programmer Comments" in the "Inserting Report Commands" chapter in the PC-DMIS Core documentation.

Go to the next step: "Select Additional Features"