Function 4

In the User Function window:

Return Type:

Single

Input Parameters:

short a;

OUTPTR b;

Output Parameters:

short z;

In the state table:

NUMBER func4_short, NUMBER send3_short;
AssignData(send3_short, "ASSIGN", "2") ;
SendData("CUSTOM_SERVER", "TEST_PARMS", 30, "TEST_PARMS_func4", send3_short) ;
ReceiveData("CUSTOM_SERVER", "TEST_PARMS", 30, "TEST_PARMS_func4",
   func4_short) ;

So, using the data in SendData (above), func4_short in ReceiveData has a value of 91.

Example code

int TEST_PARMS_func4 (short a, char **b)
{
  if (a == 2) {
    *(short *)b = 91;
    return (0);
  } else {
    *(short *)b = -4201;
    return (-1);
  } /* endif */
}