Was this helpful?
You can include Ada comments delimited by "--" and extending to the end of the line, anywhere in an Embedded SQL statement that a line break is allowed, with the following exceptions:
In string constants.
In parts of statements that are dynamically defined. For example, a comment in a string variable specifying a form name is interpreted as part of the form name and causes a runtime syntax error.
Between component lines of Embedded SQL block-type statements. All block-type statements (such as activate and unloadtable) are compound statements that include a statement section delimited by begin and end. Comment lines must not appear between the statement and its section. The preprocessor interprets such comments as Ada host code, which causes preprocessor syntax errors. (Note, however, that comments can appear on the same line as the statement.) For example, the following statement causes a syntax error on the first Ada comment:
exec frs unloadtable empform
        employee (:namevar = ename);
-- Illegal comment before statement body
exec frs begin; -- comment legal here
        msgbuf := namevar;
exec frs end;
Statements made up of more than one compound statement, such as the display statement, which typically consists of the display clause, an initialize section, activate sections, and a finalize section, cannot have Ada comments between any of the components. These comments are translated as host code and cause syntax errors on subsequent statement components.
Last modified date: 06/10/2024