A function definition contains a list of SDC statements that provide setup and formatting information that is to be sent to an ADSI telephone. This list can be a combination of any of the SDC functions that are listed in ADSI script statements.
The syntax of a function definition is:
function function_name parm 1 ... parm n
{
statement 1;
...
statement n;
}
where:
You must send the parameters parm 1 ... parm n to an ADSI state table. You must prefix the parameter names with the dollar ($) character when you use them in the SDC statements.
You must separate the parameters by at least one blank character; for example:
load_virtual_display 1 "DAY= $day : MONTH=$month"
For more information, see function.
Here is an example of an SDC function statement:
function menu day month year
{
load_soft_key_table 2 enter;
load_virtual_display 1 "$day";
load_virtual_display 2 "$month";
load_virtual_display 3 "$year";
}
In this example, you must concatenate the parameters day, month, and year into a single string before you use the ADSI state table. You can do this by using the ADSI_Parameters state table (see ADSI_Parameters). The existing values of the parameters day, month, and year appear on the first three lines of the ADSI telephone display when this function is sent to the telephone.