Setting the Data Type Can Cause a Conversion

Siebel eScript does conversions differently depending on if the variable is typeless or strongly typed. For more information, see Using Strongly Typed and Typeless Variables.

How Siebel eScript Converts a Typeless Variable

If Siebel eScript sets the data type for a typeless variable, then it converts this variable only to another typeless variable. For example, the following examples result in Siebel eScript converting VariableA to a string:

var VariableA = 7.2;
var VariableB = "seven point 2"
VariableA = VariableB;

How Siebel eScript Converts a Strongly Typed Variable

The following table describes how Siebel eScript converts a strongly typed variable. In this table, assume that Siebel eScript must convert VariableA to VariableB.

VariableA Type VariableB Type
Value Chars Bool Float Object String Number Boolean Other

Value

Same

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Chars

Yes

Same

Yes

Yes

Yes

Yes

Yes

Yes

Yes W

Bool

Yes

Yes

Same

Yes

Yes

Yes

Yes

Yes

Yes

Float

Yes

Yes, W

Yes

Same

Yes, W

Yes, W

Yes

Yes

Yes, W

Object

Yes

Err

Err

Err

Same

None

None

None

None

String

Yes

Yes

Err

Err

Err

Same

Err

Err

Err

Number

Yes

Err

Err

Yes

Err

Err

Same

Err

Err

Boolean

Yes

Err

Yes

Err

Err

Err

Err

Same

Err

Other

Yes

Err

Err

Err

Err

Err

Err

Err

Same

The previous table uses the following abbreviations:

  • Yes. Siebel eScript converts the variable.

  • W. Siebel Tools might display a message when it compiles the script. This message warns that the conversion might not occur. The warning and conversion depend on the properties of the variables that are involved when Siebel eScript sets the data type.

  • Err. A compilation error occurs.

  • None. No conversion is required. A conversion is not typically required to modify an Object variable to a specialized object type.

  • Same. VariableA and VariableB are of the same type.

  • Value. Indicates a typeless variable. It describes the conversion that Siebel eScript does in the following situations:
    • Convert a strongly typed variable to a typeless variable.

    • Convert a typeless variable to a strongly typed variable.

  • Other. Indicates predefined types and custom types that are not the following types:

    • Object

    • String

    • Number

    • Boolean