SQL/MX Programming Manual for C and COBOL (H06.04+)
C/C++ Program Compilation
HP NonStop SQL/MX Programming Manual for C and COBOL—540434-001
15-10
Preprocessor Functions
•
System directives, such as <time.h>, are never included:
#include <time.h>
As with any #include file inclusion, you must ensure that implementation of
conditional compilation does not result in repeated file inclusion.
When a C #pragma directive is contained in an included file, it is processed by the
preprocessor.
If the file incl.mxh contains:
#pragma section sect1
EXEC SQL BEGIN DECLARE SECTION;
int a1;
EXEC SQL END DECLARE SECTION;
#pragma section sect2
EXEC SQL BEGIN DECLARE SECTION;
int a2;
EXEC SQL END DECLARE SECTION;
#pragma section sect3
EXEC SQL BEGIN DECLARE SECTION;
int a3;
EXEC SQL END DECLARE SECTION;
this construct:
#include "incl.mxh (sect1, sect3)" NOLIST
is expanded to:
/* #include "incl.h (sect1, sect3)" NOLIST */
EXEC SQL BEGIN DECLARE SECTION;
int a1;
EXEC SQL END DECLARE SECTION;
EXEC SQL BEGIN DECLARE SECTION;
int a3;
EXEC SQL END DECLARE SECTION;
This construct:
#include "incl.mxh" NOLIST
is expanded to:
/* #include "incl.h" NOLIST */
#pragma section sect1
EXEC SQL BEGIN DECLARE SECTION;
int a1;
EXEC SQL END DECLARE SECTION;
#pragma section sect2
EXEC SQL BEGIN DECLARE SECTION;










