6. Embedded QUEL for BASIC : BASIC Variables and Data Types : Variable Usage : Simple Variables
 
Share this page                  
Simple Variables
A simple scalar-valued variable (integer, floating-point or character string) is referred to by the syntax:
simplename
Syntax Notes:
1. If the variable is used to send data to Ingres, it can be a scalar-valued variable or constant.
2. If the variable is used to receive data from Ingres, it cannot be a variable declared as a constant.
3. The reference to an uninitialized BASIC dynamic string variable in an embedded statement that assigns the value of that string to Ingres results in a runtime error because an uninitialized dynamic string points at a zero address. This restriction does not apply to the retrieval of data into an uninitialized dynamic string variable.
The following program fragment demonstrates a typical message-handling routine that uses two scalar-valued variables, "buffer" and "seconds":
##   sub Msg (string buffer, integer seconds)
##        message buffer
##        sleep seconds
##   end sub