How the ST eScript Engine Determines the Type of Variables That a Script Uses
Type deduction is a feature of the Siebel eScript that determines the type of local variables that a script uses. It scans the assignments that the script makes to each local variable. If the Siebel eScript can successfully determine the type for all local variables, then the compiler performs strict type checks and creates statically bound code that runs faster and uses less memory. This configuration might introduce more compile warnings as a result of performing these type checks. It cannot determine the type in all situations. It is recommended that you type your script. To enable or disable type deduction, see Setting Options for eScript.
Example of a Script That Deduces the Local Variable Type
The following script deduces the type of the oDate local variable to the Date. It then creates a warning about the MyMethod method. This method is not defined. This script fails at run time:
function goo()
{
var oDate;
oDate = new Date ()
oDate.myMethod ();
return;
}
goo ()
Semantic Warning around line 19:No such method myMethod
Unhandled Exception: 'myMethod' is not defined