6. Embedded QUEL for BASIC : BASIC Variables and Data Types : Variable and Type Declarations : The Declare Ingres Statement
 
Share this page                  
The Declare Ingres Statement
Prior to any EQUEL declarations or statements in your main program, you must issue the following statement:
##   declare ingres
This statement causes the preprocessor to generate code to include a file of declarations needed by EQUEL at runtime. You will not be able to successfully link an EQUEL program without this statement. The statement also serves to terminate the scope of variables declared earlier in the file. Therefore, any variables declared before the declare ingres statement will not be visible to the preprocessor. For this reason, it is an error to issue two declare ingres statements in a single program module.
You should not issue the declare ingres statement in subroutines and functions declared to EQUEL. After processing a sub or function statement, the preprocessor automatically generates the declare ingres statement and terminates the scope of previous subprograms. If you do issue the declare ingres statement in a subroutine or function known to EQUEL, the preprocessor will generate a warning and ignore the statement. On the other hand, if you do not define a subprogram to EQUEL (perhaps because it lists formal parameters of a type unavailable to EQUEL variables), you must specifically issue the declare ingres statement before any EQUEL declarations or statements in that subprogram.
Because a def function is local to the program or subprogram that defines it, the declare ingres statement is neither needed nor automatically generated for it. The def function inherits its program module's variables and definitions.