Using Siebel Tools > Siebel Script Editors >

Enabling ST eScript Engine Type Deduction


This preference is set under Engine Settings in the Development Tools Options window. Click the Deduce Types checkbox to enable this setting.

Type deduction is a feature of the ST eScript Engine which deduces the type of local variables used in a script by scanning the assignments made to them. The engine cannot make the type deduction under all situations, therefore it is recommended that you strongly type your scripts.

If type deduction can be made, the compiler will perform strict type checks and generate statically bound code that runs faster and uses less memory. This may, however, introduce additional compilation warnings because of such type checks.

The following example is of a script that deduces the type of the local variable oDate to the Date and subsequently issues a warning about the undefined method MyMethod. The script subsequently 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

Using Siebel Tools