IfxDecimal methods

IfxDecimal.Abs

static IfxDecimal IfxDecimal.Abs(IfxDecimal IfxDec_)

Creates a new IfxDecimal that has a value equal to the absolute value of IfxDec_.

IfxDecimal.Add

static IfxDecimal IfxDecimal.Add(IfxDecimal IfxDec1, IfxDecimal IfxDec2)

Creates a new IfxDecimal that has a value equal to the sum of IfxDec1 and IfxDec2.

IfxDecimal.Ceiling

static IfxDecimal IfxDecimal.Ceiling(IfxDecimal IfxDec)

Creates a new IfxDecimal that is the smallest integer that is not less than IfxDec.

IfxDecimal.Clone

IfxDecimal IfxDecimal.Clone()

Creates a new IfxDecimal that is a duplicate of this instance.

IfxDecimal.Compare

static System.Int32 IfxDecimal.Compare(IfxDecimal IfxDec1, IfxDecimal IfxDec2)
The value returned is based on the relative values of IfxDec1 and IfxDec2.
-1
The value of IfxDec1 is less than the value of IfxDec2
0
The IfxDecimal objects have the same value
1
The value of IfxDec1 is greater than the value of IfxDec2

Objects in the HCL® OneDB® .NET Core Provider consider two null values to be equal to each other. They also consider a null value to be less than any non-null value.

IfxDecimal.CompareTo

System.Int32 IfxDecimal.CompareTo(System.Object obj)

This is the same as calling IfxDecimal.Compare with the instance as IfxDec1 and obj as IfxDec2.

The object obj must be an IfxDecimal object. You will get an error if you call this method from an instance that is null.

IfxDecimal.Divide

static IfxDecimal IfxDecimal.Divide(IfxDecimal Dividend, IfxDecimal Divisor)

Creates a new IfxDecimal that is the result of dividing Dividend by Divisor.

IfxDecimal.Equals

static System.Boolean IfxDecimal.Equals(IfxDecimal IfxDec1, IfxDecimal 
IfxDec2)
System.Boolean IfxDecimal.Equals(System.Object obj)

Returns true if IfxDecimal.Compare( IfxDec1, IfxDec2) would return 0.

If just obj is given then the instance is used as IfxDec1 and obj is used as IfxDec2. The obj object must be an IfxDecimal.

IfxDecimal.Floor

static IfxDecimal IfxDecimal.Floor(IfxDecimal IfxDec)

Creates a new IfxDecimal whose value is the largest integer not larger than the value of IfxDec.

IfxDecimal.GetHashCode

System.Int32 IfxDecimal.GetHashCode()

Returns the hash code for this instance.

The hash code will be the same for any two IfxDecimal objects that have the same value but might also be the same for two IfxDecimal objects with different values.

See the description of the Object.GetHashCode method in the .NET Framework Class Library for details about hash codes.

IfxDecimal.GreaterThan

static System.Boolean IfxDecimal.GreaterThan(IfxDecimal IfxDec1, IfxDecimal 
IfxDec2)

Returns true if IfxDecimal.Compare(IfxDec1, IfxDec2) would return 1; otherwise returns false.

IfxDecimal.GreaterThanOrEqual

static System.Boolean IfxDecimal.GreaterThanOrEqual(IfxDecimal IfxDec1, IfxDecimal 
IfxDec2)

Returns true if IfxDecimal.Compare(IfxDec1, IfxDec2) would return 0 or 1; otherwise returns false.

IfxDecimal.LessThan

static System.Boolean IfxDecimal.LessThan(IfxDecimal IfxDec1, IfxDecimal 
IfxDec2)

Returns true if IfxDecimal.Compare(IfxDec1, IfxDec2) would return -1; otherwise returns false.

IfxDecimal.LessThanOrEqual

static System.Boolean IfxDecimal.LessThanOrEqual(IfxDecimal IfxDec1, IfxDecimal 
IfxDec2)

Returns true if IfxDecimal.Compare(IfxDec1, IfxDec2) would return 0 or -1; otherwise returns false.

IfxDecimal.Max

static IfxDecimal IfxDecimal.Max(IfxDecimal IfxDec1, IfxDecimal IfxDec2)

Creates a new IfxDecimal with a value equal to the value of IfxDec1 or IfxDec2, whichever is larger.

Neither IfxDec1 nor IfxDec2 can be null.

IfxDecimal.Min

static IfxDecimal IfxDecimal.Min(IfxDecimal IfxDec1, IfxDecimal IfxDec2)

Creates a new IfxDecimal with a value equal to the value of IfxDec1 or IfxDec2, whichever is smaller.

Neither IfxDec1 nor IfxDec2 can be null.

IfxDecimal.Modulo

static IfxDecimal IfxDecimal.Modulo(IfxDecimal a, IfxDecimal b)

Synonym for IfxDecimal.Remainder.

IfxDecimal.Multiply

static IfxDecimal IfxDecimal.Multiply(IfxDecimal IfxDec1, IfxDecimal IfxDec2)

Creates a new IfxDecimal that has a value equal to IfxDec1 times IfxDec2.

IfxDecimal.Negate

static IfxDecimal IfxDecimal.Negate(IfxDecimal IfxDec)

Creates a new IfxDecimal that is the result of reversing the sign (positive or negative) of this instance.

IfxDecimal.NotEquals

static System.Boolean IfxDecimal.NotEquals(IfxDecimal IfxDec1, IfxDecimal 
IfxDec2)

Returns true if IfxDecimal.Compare( IfxDec1, IfxDec2 ) would return 1 or -1.

IfxDecimal.Parse

static IfxDecimal IfxDecimal.Parse(System.String s)

Leading and trailing spaces in s are ignored. You can include an optional exponent by placing an e or E between the decimal value and the exponent. Exponents can be negative.

Example: This C# statement creates an IfxDecimal named d that has a value of -0.000032:
IfxDecimal d = IfxDecimal.Parse(" -3.2e-5  ");

Creates a new IfxDecimal with a value equal to the decimal value represented in s.

IfxDecimal.Remainder

static IfxDecimal IfxDecimal.Remainder(IfxDecimal a, IfxDecimal b)

Creates a new IfxDecimal the value of which is the remainder of the integer division of a by b. Integer division in this case means that b goes into a an integral (whole) number of times and what is left over is the remainder.

The sign (positive or negative) of the remainder will always match the sign of a.

IfxDecimal.Round

static IfxDecimal IfxDecimal.Round(IfxDecimal IfxDec1, System.Int32 
FractionDigits)

Returns a new IfxDecimal that has the value of IfxDec1 rounded to FractionDigits digits to the right of the decimal point. If FractionDigits is 0 the value is rounded to the ones place. If FractionDigits is -1 the value is rounded to the tens place, and so on.

Example: If IfxDec1 is an IfxDecimal with a value of 123.45 then this table gives the results of rounding to different positions.
Value of FractionDigits Result of IfxDecimal.Round(IfxDec1,FractionDigits)
-2 100.0
-1 120.0
0 123.0
1 123.5
2 123.45

IfxDecimal.Subtract

static IfxDecimal IfxDecimal.Subtract(IfxDecimal IfxDec1, IfxDecimal IfxDec2)

Creates a new IfxDecimal that has a value of IfxDec1 minus IfxDec2.

IfxDecimal.ToString

System.String IfxDecimal.ToString()
System.String IfxDecimal.ToString (System.String format)

Returns the value of the instance as a string. If format is not present the format used is that of an ordinary decimal number, no exponent is used.

If format is provided, the output is formatted in the way indicated in that string. The syntax of format is as described in the section "Formatting Numeric Strings" in HCL OneDB ESQL/C Programmer's Manual.

IfxDecimal.Truncate

static IfxDecimal IfxDecimal.Truncate(IfxDecimal IfxDec1, System.Int32 
FractionDigits)

Like IfxDecimal.Round(IfxDec1, FractionDigits) except that all digits to the right of the indicated digit are set to zero rather than rounded.

Example: This table gives the results of truncating an IfxDecimal named IfxDec1 that has a value of 999.99.
Value of FractionDigits Result of IfxDecimal.Truncate(IfxDec1,FractionDigits)
-2 900.0
-1 990.0
0 999.0
1 999.9
2 999.99