Top Method Summary
Options Name Purpose
INT64 And (int64, int64) Performs a bitwise AND operation
INT64 Hex2Int (character) Converts a hexadecimal string expression into the Integer value
CHARACTER Int2Hex (int64) Converts an integer value into a hexadecimal string expression
LOGICAL IsNumber (character) Returns if the provided string is an unsigned integer number, i.e. consists only of the digits 0 to 9
INT64 Not (int64) Performs a bitwise NOT operation
INT64 Or (int64, int64) Performs a bitwise OR operation
INTEGER Percentage (integer, integer) Returns the percentage of the provided value to the provided whole
INT64 Roundup (decimal) Rounds up a number if it's not already an integer
INT64 Xor (int64, int64) Performs a bitwise XOR operation

Top Constructor Summary
Options Name Purpose
MathHelper () Disallow instance creation


Method Detail
Top

INT64 And (int64, int64)

Purpose: Performs a bitwise AND operation
Notes:

Parameters:
piValue1 INT64
The first operand
piValue2 INT64
The second operand
Returns INT64
The resulting value
Top

INT64 Hex2Int (character)

Purpose: Converts a hexadecimal string expression into the Integer value
Notes: Accepts an optional leading minus sign and an optional 0x prefix
followed by up to 16 hexadecimal digits. An empty digit string
(e.g. "", "-" or "0x") returns 0

Parameters:
pcHex CHARACTER
The hexadecimal value
Returns INT64
The resulting integer value
Top

CHARACTER Int2Hex (int64)

Purpose: Converts an integer value into a hexadecimal string expression
Notes: Negative values are returned as a minus sign followed by the
hexadecimal digits of the absolute value (e.g. -10 returns "-A"),
not in two's complement notation. Hex2Int accepts that format

Parameters:
piInt INT64
The integer value
Returns CHARACTER
The resulting hexadecimal value (upper case digits, no prefix)
Top

LOGICAL IsNumber (character)

Purpose: Returns if the provided string is an unsigned integer number, i.e.
consists only of the digits 0 to 9
Notes: SCL-5944: Leading and trailing white space is ignored. Every other
character is handled as invalid, including signs (+, -), decimal
points and thousands separators (independent of the
session:numeric-format), numeric-format), symbols like *, letters and digits from
other scripts. Leading zeros are valid ("00" returns TRUE). The
value is not range checked, a long digit string may exceed the
range of the INTEGER or INT64 data type

Parameters:
pcString CHARACTER
The string to verify
Returns LOGICAL
Logical value indicating if the value consists of digits only
Top

INT64 Not (int64)

Purpose: Performs a bitwise NOT operation
Notes:

Parameters:
piValue INT64
The value to be processed
Returns INT64
The resulting value
Top

INT64 Or (int64, int64)

Purpose: Performs a bitwise OR operation
Notes:

Parameters:
piValue1 INT64
The first operand
piValue2 INT64
The second operand
Returns INT64
The resulting value
Top

INTEGER Percentage (integer, integer)

Purpose: Returns the percentage of the provided value to the provided whole
Notes: The result will never exceed 100%, even when the value is higher than
the whole. A value of 0 or below returns 0, a positive value returns
100 when it is equal to or higher than the whole (this includes a
whole of 0 or below). Otherwise the percentage is rounded, but
100 is only returned when the value reaches the whole, so a value
just below the whole (e.g. 999 of 1000) returns 99

Parameters:
piValue INTEGER
The (smaller) value
piWhole INTEGER
The whole (100%) value
Returns INTEGER
The percentage value
Top

INT64 Roundup (decimal)

Purpose: Rounds up a number if it's not already an integer
Notes: Negative numbers will actually be rounded down, i.o.w. Roundup (-1.5)
will return -2, so that the absolute value will be rounded up

Parameters:
pdeNumber DECIMAL
The number to round up
Returns INT64
The rounded value
Top

INT64 Xor (int64, int64)

Purpose: Performs a bitwise XOR operation
Notes:

Parameters:
piValue1 INT64
The first operand
piValue2 INT64
The second operand
Returns INT64
The resulting value


Constructor Detail
Top

MathHelper ()

Purpose: Disallow instance creation
Notes:



©2006-2026 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       10.10.2026 15:35:47