Accessors for class IliDecimal

Properties

Methods

Description

The IliDecimal class is used to hold floating-point numbers with up to 38 digits of precision, represented internally in base 10. This contrasts with the Rogue Wave Views Script Number type that represents floating-point numbers in base 2 and has a machine-dependent precision (typically 15 digits).

TypeNameDescriptionNotes
IntsignContains +1 if the value of the decimal is positive, 0 if it is zero, and -1 if it is negative.read-only
IliDecimalabs()Returns the absolute value of the decimal.
IliDecimaladd(IliDecimal dec)Returns the sum of this decimal with dec.
IliDecimalcompareTo(IliDecimal dec)Returns +1 if the decimal is greater than dec, 0 if they are equal, and -1 if the decimal is less than dec.
IliDecimalmultiply(IliDecimal dec)Returns the product of this decimal with dec.
IliDecimalnegate()Returns the opposite of this decimal.
IliDecimalsubstract(IliDecimal dec)Returns the difference of this decimal with dec.
NumbertoNumber()If this decimal fits in a Rogue Wave Views Script number, this number is returned. Otherwise, an error is raised.
StringtoString()Returns a character string representation of this decimal.
IliDecimalIliDecimalThe str parameter is expected to contain the representation in base 10 of a decimal number using the following syntax:
[-|+]{digit}*[.[{digit}*]] 
or
[-|+]{digit}+[.[{digit}*]][{E|e}[-|+]{digit}+]

This function returns an IliDecimal object having a value represented by the str parameter. If the str parameter cannot be parsed into an IliDecimal object, null is returned.
-|+