Bookshelf Home | Contents | Index | Search | PDF |
Siebel eScript Language Reference > Siebel eScript Commands > The Clib Object >
Clib.div() Method and Clib.ldiv() Method
These methods perform integer division and return a quotient and remainder in a structure.
Syntax
Clib.div(numerator, denominator)
Clib.ldiv(numerator, denominator)
Parameter Description numerator The number to be divided denominator The number by which numerator is to be dividedReturns
A structure with the following elements, which are the result of dividing numerator by denominator:
Usage
Because Siebel eScript does not distinguish between integers and long integers, the Clib.div() and Clib.ldiv() methods are identical.
Example
The following example accepts two numbers as input from the user, divides the first by the second, and displays the result:
var division = Clib.div(ToNumber(n), ToNumber(d));
TheApplication().RaiseErrorText("The quotient is " + division.quot + ".\n\n" + "The remainder is " + division.rem + ".");
Bookshelf Home | Contents | Index | Search | PDF |
Siebel eScript Language Reference Published: 18 April 2003 |