Siebel eScript Language Reference > Using Siebel eScript > Using Operators in Siebel eScript >

Overview of Mathematical Operators


Table 10 describes the basic arithmetic operators you can use in Siebel eScript.

Table 10. Basic Arithmetic Operators in Siebel eScript
Operator
Description

=

Make one number equal to another number.

+

Add two numbers.

-

Subtract one number from another number.

*

Multiply two numbers.

/

Divide one number by another number.

%

Return a remainder after a division operation. It is a modulo.

The following examples use variables and arithmetic operators:

var i;
i = 2;     //i is now 2
i = i + 3; //i is now 5, (2 + 3)
i = i - 3; //i is now 2, (5 - 3)
i = i * 5; //i is now 10, (2 * 5)
i = i / 3; //i is now 3.333..., (10 / 3)
i = 10;    //i is now 10
i = i % 3;  //i is now 1, (10 mod 3)

If uncertainty exists about how Siebel eScript might evaluate an expression, then it is recommended that you use parentheses. This recommendation is true even if you do not require parentheses to modify the sequence that Siebel eScript uses to evaluate expressions.

Siebel eScript Language Reference Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.