// Single-line comments
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Allows you to add explanatory text to code. The comment begins with a double
slash (//) and ends at a newline character (\n), a
carriage return (\r), or the end of the file.
Syntax
|
- comment
- Descriptive text.
Note: Comments can be nested.
Examples
This example uses a comment to document a procedure modification:
|
To be properly interpreted as the beginning of a single-line comment, the
"//" must be preceded by a line break or white space. In the first line
of code below, the text between "//" and the end of the line will be
interpreted as a comment, but it will not in the second line:
|
Notes
-
CAUTION: If you need to use
//at the beginning of a pathname, such as inRUN //dir1/file, the pathname will be interpreted as a comment because the//is preceded by a space. Enclosing the pathname in quotes ensures that the text following//will not be treated as a comment. Pathnames that contain//in their interior, such as inRUN parent//dir1/file, will work as expected. - Both multi-line comments and single-line comments can be nested inside a single-line comment.