Siebel eScript Language Reference > C Language Library Reference > Clib Mathematical Methods >

Clib Get Integer Method


The Clib Get Integer method calculates and returns the integer part of a decimal number. The effect is identical to that of the Convert Value to Integer method. For more information, see Convert Value to Integer Method.

Format

Clib.modf(number, var intVar)

Table 170 describes the arguments for the Clib Get Integer method.

Table 170. Arguments for the Clib Get Integer Method
Argument
Description

number

The floating-point number that this method splits.

intVar

Contains the integer part of the number.

Example

The following example passes the same value to the Clib Get Integer method and to the Convert Value to Integer method. The result is the same for each method:

function eScript_Click ()
{
   Clib.modf(32.154, var x);
   var y = ToInteger(32.154);
   TheApplication().RaiseErrorText("modf yields " + x +
         ".\nToInteger yields " + y + ".");
}

This example produces the following result:

modf yields 32
ToInteger yields 32.

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