2. Embedded QUEL for C : C Variables and Data Types : Variable Usage : Simple Variables
 
Share this page                  
Simple Variables
The following syntax refers to a simple scalar-valued variable (integer, floating-point, or character string):
simplename
Syntax Notes:
If you use the variable to send values to Ingres, it can be any scalar-valued variable or ##define constant, enumerated variable, or enumerated literal.
If you use the variable to receive values from Ingres, it can only be a scalar-valued variable or enumerated variable.
Character strings that are declared as:
char *character_string_pointer;
or:
char character_string_buffer[];
are considered scalar-valued variables and should not include any indirection when referenced.
External compiled forms that are declared as:
UNIX:
extern int *compiled_formname; 
VMS:
globalref int *compiled_formname; 
should not include any indirection when referenced in the addform statement:
## addform compiled_formname;
The following example shows a message handling routine. It passes two scalar-valued variables as parameters: "buffer," a character string, and "seconds," an integer variable.
## Print_Message(buffer, seconds)
  ##        char *buffer
  ##        short seconds
  ## {
  ##        message buffer
  ##        sleep seconds
  ## }