2. Embedded QUEL for C : C Variables and Data Types : Variable and Type Declarations : ## Define Declaration
 
Share this page                  
## Define Declaration
The EQUEL preprocessor accepts the ## define directive, which defines a name to be a constant value. The EQUEL preprocessor replaces the ## define statement with the C # define statement.
The syntax for the ## define statement is:
## define constant_name constant_value
Syntax Notes:
The constant_value must be an integer, floating-point, or character string literal. It cannot be an expression or another name. It cannot be left blank, as would happen if you intend to use it later with the # ifdef statement. If the value is a character string constant, you must use double quotes to delimit it. Do not use single quotes to delimit constant_name in order to make it be interpreted as a single character constant, because the preprocessor translates the single quotes into double quotes. For example, both of the following names are interpreted as string constants, even though the first may be intended as a character constant:
## define QUITFLAG 'Q'
## define ERRORMSG "Fatal error occurred."
The preprocessor does not accept casts before constant_value. In general, the preprocessor does not accept casts, and it interprets data types from the literal value.
You can only use a defined constant to assign values to Ingres objects. Attempting to retrieve Ingres values into a constant causes a preprocessor error.
## define minempnum 1
## define maxsalary 150000.00
## define defaultnm "No-name"
EQUEL does not recognize a C define declaration with only one #.