Product Site

Chapter 3. Directives

3.1. ::ANNOTATE
3.2. ::ATTRIBUTE
3.3. ::CLASS
3.4. ::CONSTANT
3.5. ::METHOD
3.6. ::OPTIONS
3.7. ::REQUIRES
3.8. ::RESOURCE
3.9. ::ROUTINE

A Rexx program contains one or more executable code units. Directive instructions separate these executable units. A directive begins with a double colon (::) and is a nonexecutable instruction. For example, it cannot appear in a string for the INTERPRET instruction to be interpreted. The first directive instruction in a program marks the end of the main executable section of the program.

For a program containing directives, all directives are processed first to set up the program's classes, methods, and routines. Then any program code in the main code unit (preceding the first directive) is processed. This code can use any classes, methods, and routines that the directives established.

Supported directives are ::ANNOTATE, ::ATTRIBUTE, ::CLASS, ::CONSTANT, ::METHOD, ::OPTIONS, ::REQUIRES, ::RESOURCE, and ::ROUTINE.

A directive requires a semicolon (;) as a terminating delimiter unless the end of a line implies it.