2. Embedded QUEL for C : C Variables and Data Types : Variable Usage
 
Share this page                  
Variable Usage
C variables declared to EQUEL can substitute for most elements of EQUEL statements that are not keywords. Of course, the variable and its data type must make sense in the context of the element. The generic uses of host language variables in EQUEL statements are discussed in the QUEL Reference Guide. The following discussion covers only the usage issues particular to C language variable types.
You must verify that the statement using the variable is in the scope of the variable's declaration. As an example, the following retrieve statement uses the variables "namevar" and "numvar" to receive data, and the variable "idno" as an expression in the where clause:
## retrieve (namevar = employee.empname,
##           numvar = employee.empnum) where 
##           employee.empnum = idno