(* This is an old style comment *)
{ This is a Turbo Pascal comment } // This is a Delphi comment. All is ignored till the end of the line. |
The following are valid ways of nesting comments:
{ Comment 1 (* comment 2 *) }
(* Comment 1 { comment 2 } *) { comment 1 // Comment 2 } (* comment 1 // Comment 2 *) // comment 1 (* comment 2 *) // comment 1 { comment 2 } |
The last two comments must be on one line. The following two will give errors:
// Valid comment { No longer valid comment !!
} |
and
// Valid comment (* No longer valid comment !!
*) |
The compiler will react with a 'invalid character' error when it encounters such constructs, regardless of the -So switch.