2. Embedded SQL for C : C Variables and Data Types : Variable and Type Declarations : Reserved Words in Declarations
 
Share this page                  
Reserved Words in Declarations
The following C keywords are reserved. Therefore, you cannot declare types or variables with the same name as these keywords:
auto
extern
int
typedef
char
float
long
union
const
globalconstdef
register
unsigned
define
globaldef
short
varchar
double
globalconstref
static
volatile
enum
globalref
struct
 
Not all C compilers reserve every keyword listed. However, the embedded SQL/C preprocessor does reserve all these words.
The embedded SQL preprocessor does not distinguish between uppercase and lowercase in keywords. When it generates C code, it converts any uppercase letters in keywords to lowercase.
For example, although the following declarations are initially unacceptable to the C compiler, the preprocessor converts them into legitimate C code:
# defINE ARRSIZE 256; /*"defINE"converts to "define" */
INT numarr[ARRSIZE]; /*"INT" is equivalent to "int" */
The rule just described is true only for keywords. The preprocessor does distinguish between case in program-defined types and variables.
Variable and type names must be legal C identifiers beginning with an underscore or alphabetic character.