Semantic Warnings
A semantic warning notifies you that a script will run but it might produce unexpected results or it might not be efficient. A semantic warning does not display during compilation. To view them in Siebel Tools, you choose Debug, and then Check Syntax.
The following table describes semantic warnings in eScript when Siebel Tools compiles ST eScript code. Semantic warnings start with the following prefix: Semantic Warning around line line#. For more information, see Semantic Error Messages.
Message | Example | Cause |
---|---|---|
Undefined identifier identifier. Global object will be used to locate the identifier. |
|
An undeclared variable created in a function is not locally defined. Instead, it is created as a property of the Global object. |
Variable variable might not be initialized. |
|
The variable declared is not explicitly assigned a value. It is recommended that you initialize a variable to a default value when you declare it. For example:
In the example, you must assign the following variable a value so Siebel CRM can display it in the RaiseErrorText function: a |
Label 'label' is unused and can be removed. |
|
A label is defined in the function but none of the following statements use it. In this situation, you can remove this label:
|
Calling function function_label with insufficient number of arguments. |
|
You did not provide all of the arguments that the function requires. The number of arguments you provide must equal the number of arguments specified in the function definition. |
Type conversion from data_type1 to data_type2 cannot succeed. |
|
When the data type of a variable does not match the value assigned to the variable, the Siebel eScript engine attempts to convert the data type. This conversion process might not be successful. In the example, the following string value is assigned to a variable that is of a float data type: 123 The Siebel eScript engine attempts to convert this string to a float data type. |
No such method method_name. |
|
The specified method is not defined or the method name is incorrect. In the example, you must define fn. |
Variable variable is double declared. |
Example 1 Example 2
|
A local variable is declared more than once. To avoid this warning for the common case in Example 1, you can do the following:
For example:
In Example 2, the multiple declarations result in Siebel eScript assigning each declaration that occurs after the first declaration as a simple assignment but with the unnecessary overhead of declaring a variable. Instead, you can use a simple assignment after the first declaration. For example:
|