Comments

In OS/2, the first line of a REXX program must start with a comment in column 1. This tells OS/2 your program is written in REXX, and not its built-in Batch facility. Both Batch facility and REXX programs can use the file name extension CMD. Each requires its own special processing, so OS/2 checks the first line to see which type of program it is. If it finds a REXX comment, the program is processed as REXX. Use /* and */ to mark the start and end of a comment:

/* This is the required column-1 comment. */

say ...  /* This is a comment on the same line as an instruction */

/* Comments may
   occupy more
   than one line. */

/*************************************
*  Comments may be boxed as headers: *
*                                    *
*  HELLO.CMD written by J. Smith     *
*        November 15, 1994           *
* A program to greet a user by name. *
*************************************/

For a column-1 comment it is enough to use /* */, but more often one uses this space to give a brief description of the program.

When REXX finds a /*, it stops interpreting the program until a */ is found, which may be a few words or several lines later.


[Back: Assignments]
[Next: Using Functions]