This section describes the com_var function, used to locate COM memory variables, the movable nature of COM data, and the use of COM statements in CSUB prototype definitions. Two example C programs are presented to demonstrate how to access COM variables.
You may access COM variables from within a CSUB. The com_var function is used to return a pointer to either the start of the specified COM variable data area, its dimension table, or the start of the specified COM data area. If the COM area is not defined or if the variable is not defined, or if the variable is not an array, a null pointer is returned. The function is defined as: