Add comments to ESQL/C programs

To add comments to the program, you can use either of the following formats:
  • You can use a double dash (--) comment indicator on any statement. The statement must begin with either EXEC SQL or $ and terminate with a semicolon. The comment continues to the end of the line.
    For example, the comment on the first of the following lines notes that the statement opens the stores7 demonstration database:
    EXEC SQL database stores7;   -- stores7 database is open now!
    printf("\nDatabase opened\n");  /* This is not an ESQL/C */
                                    /* line so it needs a    */
                                    /* regular C notation    */
                                     /* for a comment */
  • You can use a standard C comment on the line, as the following example shows:
    EXEC SQL begin work;  /* You can also use a C comment here */