Comments

The Delphi language supports three types of comments: curly brace comments, parenthesis/asterisk comments, and double backslash comments. Examples of each type of comment follow:

{ Comment using curly braces }
(* Comment using paren and asterisk *)
// double backslash comment

The first two types of comments are virtually identical in behavior. The compiler considers the comment to be everything between the open-comment and close-comment delimiters. For double backslash comments, everything following the double backslash until the end of the line is considered a comment.

Note

You cannot nest comments of the same type. Although it is legal syntax to nest comments of different types inside one another, we don’t recommend the practice. Here ...

Get Delphi for .NET Developer’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.