HPGCC3 Documentation 3.0 R003

Bint functions

Functions

SAT_OBJECT sat3_createbint_int (SAT_OBJECT where, int value)
 Create a system bint from an int.
int sat3_convertbint_int (SAT_OBJECT bint)
 Convert a system bint into a 32-bit int.
unsigned int sat3_convertbint_uint (SAT_OBJECT bint)
 Convert a system bint into a 32-bit unsigned integer.

Detailed Description

This group includes all functions used to create/convert bints.


Function Documentation

int sat3_convertbint_int ( SAT_OBJECT  bint)

Convert a system bint into a 32-bit int.

This function converts a sysRPL BINT object to an int.

Parameters:
bintA SAT_OBJECT bint number.
Returns:
int with the given number. If bint < 0 the sign is extended to 32-bit.
See also:
sat3_createbint_int sat3_convertbint_uint Object creation and manipulation
unsigned int sat3_convertbint_uint ( SAT_OBJECT  bint)

Convert a system bint into a 32-bit unsigned integer.

This function converts a sysRPL BINT object to an (unsigned int).

Parameters:
bintA SAT_OBJECT bint number.
Returns:
int with the given number. No sign extension, returned number is < 0x100000
See also:
sat3_createbint_int sat3_convertbint_int Object creation and manipulation
SAT_OBJECT sat3_createbint_int ( SAT_OBJECT  where,
int  value 
)

Create a system bint from an int.

This function creates a BINT object (20-bit integer sysRPL BINT) from a 32-bit integer.

Parameters:
whereDefines where to allocate memory from. Can be one of the following constants: ALLOC_HEAP Allocates from the C-heap using malloc() ALLOC_TEMPOB Allocates memory from the TEMPOB calculator area or... it can be an element (SAT_OBJECT) within a composite object, (array, list or any other).
valueInitial value to assign to the newly created bint. Only the lower 20-bits are used, the rest is ignored.
Returns:
SAT_OBJECT with the new bint, or zero if it fails. When a SAT_OBJECT is given to the 'where' parameter, the same SAT_OBJECT is returned or 0 if error.
See also:
sat3_convertbint_int Object creation and manipulation