Binary Integers (BINT)


Defines

#define BINTnibbles(src)   (10)
 The size of a BINT in nibbles.

Functions

bool isBINT (SatAddr src)
 is object a BINT?
bool BINTdecode (SatAddr src, int *dst)
 Convert BINT to C integer.
SatAddr BINTencode (int src, SatAddr dst)
 Convert a C integer to a BINT.
SatAddr makeBINT ()
 Create a new BINT in tempOb. It's value is undefined.

Detailed Description

A BINT is a 5 nibble unsigned binary number

Define Documentation

#define BINTnibbles ( src   )     (10)

The size of a BINT in nibbles.

Parameters:
src Saturn address of the BINT. Although unnecessary, the parameter is included for consistency
Returns:
Always returns 10


Function Documentation

bool BINTdecode ( SatAddr  src,
int *  dst 
)

Convert BINT to C integer.

Parameters:
src The BINT to decode
dst Where to store the BINT's value
Returns:
true on success, false if src doesn't contain a BINT

SatAddr BINTencode ( int  src,
SatAddr  dst 
)

Convert a C integer to a BINT.

Parameters:
src The integer to convert. It must be between 0x0 and 0xFFFFF
dst Where to store the BINT. If zero then a new BINT is created.
Returns:
The BINT's Saturn address, or 0 if i is out of range

bool isBINT ( SatAddr  src  ) 

is object a BINT?

Parameters:
src Saturn address of an object
Returns:
true if the object at src is a BINT


Generated on Sat Apr 3 16:38:31 2010 for HPObjects by  doxygen 1.5.0