HPGCC3 Documentation 3.0 R003

Stack functions

Functions

int sat3_depth ()
 Get number of elements on the RPL stack (DEPTH)
void sat3_drop ()
 Pop one element off the stack (DROP)
void sat3_dropn (int n)
 Pop several elements off the stack (DROPN)
void sat3_swap ()
 Swap elements on level 1 and 2 (SWAP)
BOOL sat3_push (SAT_OBJECT object)
 Push an object to the stack.
SAT_OBJECT sat3_pop ()
 Pop an object from the stack. Stack Level 1 is dropped.
SAT_OBJECT sat3_pick (int level)
 Get an object at an arbitrary stack level. Stack remains unaltered.
BOOL sat3_pushtruefalse (BOOL arg)
 Push saturn flag FALSE if arg is FALSE, TRUE otherwise.

Detailed Description

This group includes all functions used to access the calculator stack.


Function Documentation

int sat3_depth ( )

Get number of elements on the RPL stack (DEPTH)

Returns:
Number of elements on stack or zero if empty
void sat3_drop ( )

Pop one element off the stack (DROP)

void sat3_dropn ( int  n)

Pop several elements off the stack (DROPN)

SAT_OBJECT sat3_pick ( int  level)

Get an object at an arbitrary stack level. Stack remains unaltered.

Parameters:
levelStack level to pick from (1 = first stack level)
Returns:
Object in requested level of the stack. Returns NULL if requested level doesn't contain an object.
SAT_OBJECT sat3_pop ( )

Pop an object from the stack. Stack Level 1 is dropped.

Returns:
Object in level 1 of the stack. Returns NULL if stack is empty.
BOOL sat3_push ( SAT_OBJECT  object)

Push an object to the stack.

If the object to push was created in the C-heap, a copy in TEMPOB will be automatically created.

Parameters:
objectObject to push.
Returns:
Returns TRUE if push was successful, FALSE on error
BOOL sat3_pushtruefalse ( BOOL  arg)

Push saturn flag FALSE if arg is FALSE, TRUE otherwise.

Parameters:
argBoolean True/False to push on the calculator stack
Returns:
Returns TRUE if push was successful, FALSE on error
void sat3_swap ( )

Swap elements on level 1 and 2 (SWAP)