Passing a Value Through a Variable
Siebel eScript can pass a value to a function through a variable. This variable retains the value that it contained before Siebel eScript passes it even though the subroutine or function might modify the passed value. The following example includes this configuration:
var VariableA = 5;
var VariableB = ReturnValue(VariableA);
function ReturnValue(VariableC)
{
VariableC = 2 * VariableC;
return VariableC ;
}
The following occurs in this example:
VariableA equals 5 and VariableB equals 10.
VariableC contains a value only while the ReturnValue function runs.
VariableC does not contain a value after the ReturnValue function finishes.
Siebel eScript passes VariableA as a parameter to the ReturnValue function and it manipulates this value as VariableC.
VariableA retains the value that it contained before Siebel eScript passed it.