HTBasic Help
×
Menu
Index

com_var Function

 
void *com_var(char *name, int varnum, int ptrtype);
 
The first argument is a pointer to the COM area name. The name is specified with the first character in upper case and the rest in lower case. The blank COM area name is specified as a single space.
 
The second argument is the COM variable number. Its value ranges from zero through the number of defined variables in the COM area. COM variables are numbered in left to right order starting with 1. If a zero is specified, the start of the COM data area is returned. If too large a variable number is specified, a null pointer is returned.
 
The third argument specifies the type of pointer to return. A zero specifies the variable data pointer and a one specifies the dimension table entry pointer. If a dimension table pointer is requested for a variable that is not a string or an array, a null pointer is returned.