Compaq AA-RH99A-TE Remote Starter User Manual


 
data type. It returns the pointer value if the data type of the array element
is a pointer data type.
This function returns TRUE if it is successful, FALSE otherwise. When
the return value is FALSE, an error message is returned in an argument
to the function.
This function has the following syntax:
Boolean array_element_val(
DataStruct sym,
int i,
long* ele_ret,
char ** error);
Argument
Input/Output
Description
sym
Input Names the array
i
Input Specifies the index of the element
ele_ret
Output Returns the value of the pointer
error
Output Returns a pointer to an error message if
the return value is FALSE
You use the array_element_val function when the array element is of a
basic C type. You also use this function if the array element is of a pointer
type and the pointer value is what you actually want. This function returns
a printable value. The first argument of the array_element_val function
usually comes from the returned result of the read_sym function.
For example:
static char get_ele(array, i)
DataStruct array;
int i;
{
char *error, ret;
long val;
if(!array_element_val(array, i, &val, &error)){
fprintf(stderr, "Couldnt read array element:\n");
fprintf(stderr, "%s\n", error);
quit(1);
}
ret = val;
return(ret);
}
Writing Extensions to the kdbx Debugger 3–5