Function 1

In the User Function window:

Return Type:

Single

Input Parameters:

char a[1];

short b;

Output Parameters:

char z[1];

In the state table:

STRING func1_char, STRING send1_char, STRING send1_short;
OpenHostServerLink("CUSTOM_SERVER", "TEST_PARMS");
AssignData(send1_char, "ASSIGN", "D");
AssignData(send1_short, "ASSIGN", "2");
SendData("CUSTOM_SERVER", "TEST_PARMS", 30, "TEST_PARMS_func1",
        send1_char, send1_short);
ReceiveData("CUSTOM_SERVER", "TEST_PARMS", 30, "TEST_PARMS_func1",
           func1_char) ;
CloseHostServerLink("CUSTOM_SERVER", "TEST_PARMS") ;

So, using the data in SendData (above), func1_char in ReceiveData has a value of "Y".

Example code

char TEST_PARMS_func1 (char a, short b)
{
  if (a == 'D') {
    if (b == 2) {
      return ('Y');
    } else {
      return ('y');
    } /* endif */
  } else {
    if (b == 2) {
      return ('N');
    } else {
      return ('n');
    } /* endif */
  } /* endif */
}