2. Embedded QUEL for C : Precompiling, Compiling, and Linking an EQUEL Program : Coding Requirements for Writing EQUEL Programs : Comments Embedded in C Output
 
Share this page                  
Comments Embedded in C Output
Each EQUEL statement generates one comment and a few lines of C code. You may find that the preprocessor translates 50 lines of EQUEL into 200 lines of C. This may result in confusion about line numbers when you are debugging the original source code. To facilitate debugging, each group of C statements associated with a particular statement is preceded by a comment corresponding to the original EQUEL source. (Note that only executable EQUEL statements are preceded by a comment.) Each comment is one line long and informs the reader of the file name, line number, and type of statement in the original source file. The -# flag to equel makes the C comment a C compiler directive, causing any error messages generated by the C compiler to refer to the original file and line number; this may be useful in some cases.
One consequence of the generated comment is that you cannot comment out embedded statements by putting the opening comment delimiter on an earlier line. You have to put the opening comment delimiter on the same line, before the ## delimiter, to cause the preprocessor to treat the complete statement as a C comment.