Loading...
 

CX_INTEGER

CX_INTEGER

Class hierarchy
Description:

This class is used to store an integer. The number must come from the value range -2,147,483,648 (= -231) to 2,147,483,647 (=231-1).

From objects of the class CX_INTEGER data of the type INTEGER are to be distinguished:

CX_INTEGER:

  • are returned by the widget integer
  • can be created via CreateTransObject(CX_INTEGER) can be created
  • have the functions listed here
  • can be converted into a value of the type INTEGERtype

INTEGER:

  • arise when an integer literal is placed on the stack. Note that negative numbers must be written in parentheses.
  • is used by many functions

199051
Used on a INTEGER value on the stack a method is executed by call, then the INTEGERvalue for the call is implicitly converted into a temporary CX_INTEGER-object, on which the call then takes place. In this way, all the methods listed here can be used on normal INTEGER-numbers can be executed. It should be noted that the object only exists for the duration of the call and methods that change the object (e.g. DivAssign) only change this temporary object and thus have no effect on the INTEGER-value.

Code example:
Var(int) CreateTransObject(CX_INTEGER) -> int (-2) int Put int Call(IsNegative) // -> TRUE (-2) Call(IsNegative) // -> TRUE 42 Call(PrimeFactors) // -> [ 2 3 7 ]

Operators

The following operators are available for an object of this class:

OperatorDescription
+, -, *, /, !Arithmetic
>, <, =Compare

List of methods (MDI)
FunctionMA*ParameterReturnShort description
GetBitPattern
225959
CX_BIT_PATTERNConverts the number into a bit pattern
PrimeFactors
223987
VECTOR&lmt;INTEGER>Returns the prime factors of this number
SetInteger
231532
STRING, INTEGER Import integer from the passed string
Add CX_AMOUNTCX_AMOUNTOperator + as function
AddAssign CX_AMOUNT operator += as function
Amount OBJECT
AmountWeak
Autoformat INTEGER, INTEGERCX_AMOUNTReturns an object formatted according to the given number of digits before and after the decimal point (only for CX_VALUE, otherwise the object itself).
ChangeSign
DivAssign CX_AMOUNT Operator /= as a function
Divide CX_AMOUNTCX_AMOUNTOperator / as function
GetFraction OBJECT
GetNumeric OBJECT
GetValue OBJECT
IsInteger INTEGER
IsNegative INTEGER
IsZero INTEGER
MulAssign CX_AMOUNT operator *= as function
Multiply CX_AMOUNTCX_AMOUNTOperator * as a function
SetZero
string INTEGERCX_STRINGReturns the string representation of the object.
SubAssign CX_AMOUNT Operator -= as function
Subtract CX_AMOUNTCX_AMOUNTOperator - as a function

* MA = member access function,
greyed out = inherited function

Data Directory (DDI)
Data fieldTypeReference classI*Brief description

* I = Indexable data field,
greyed out = inherited data field.

Use in AppsWH
ModuleBrief description