Function 2

In the User Function window:

Return Type:

Single

Input Parameters:

char a[1];

short b;

Output Parameters:

long z;

In the state table:

STRING func2_long, STRING send1_char, STRING send1_short;
AssignData(send1_char, "ASSIGN", "d") ;
AssignData(send1_short, "ASSIGN", "2") ;
SendData("CUSTOM_SERVER", "TEST_PARMS", 30, "TEST_PARMS_func2",
        send1_char, send1_short) ;
ReceiveData("CUSTOM_SERVER", "TEST_PARMS", 30, "TEST_PARMS_func2",
           func2_long) ;

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

Example code

long TEST_PARMS_func2 (char a, short b)
{
  if (a == 'D') {
    if (b == 2) {
      return (1);
    } else {
      return (2);
    } /* endif */
  } else {
    if (b == 2) {
      return (3);
    } else {
      return (4);
    } /* endif */
  } /* endif */
}