Incorporating C Functions in QA Build

When you are developing C functions for inclusion into a QA Build program, you must perform the following tasks:

The following is an example C function that is called whenever a QA Build program uses the function unittoword():

void f_unittoword(word,number1,number2)
/* Function to convert a numeral to a character word */
char *word;
double *number1, *number2;
{
  int i;

  static char *word_for_nr[] = 
  {
    "Zero","One","Two","Three","Four",
    "Five","Six","Seven","Eight","Nine"
  };

  strcpy(word,word_for_nr[(int) *number1]);

  /* Tell QA Build the return string is 5 characters long */
  set_occurs(5);              
}