HPStack 2.3
HPStack is a package that provides easy access to the RPL stack from a C application produced with
HP-GCC
.
It also provides some routines to recall objects from directories.
The main features of HPStack are :
-
pick, pop and push data from/to the RPL stack
-
handle integer, unsigned integer, real, complex, ident, list, array and symbolic expressions
-
allow basic stack manipulation : drop, swap, rot, roll, ...
-
recall a variable from the current or an upper directory
This package is aimed to complete and systematize the functions already
implemented as 'sat_stack...' in a more generic and expandable way.
Warning :
For using symbolic expressions, you need to
download
the
HPParser
library.
Example of list processing :
You have bought fruits and vegetables, and want to compute the total price.
As an input, you have a list containing for each kind of item : its name, a number, a unit price
(e.g. {{"Potatoes" 5 1.25} {"Tomatoes" 10 2.3} {"Apples" 8 3.55}})
The program will provide as an ouput : the list of the item names {"Potatoes" "Tomatoes" "Apples"} and the total price 57.65
Get the source
here
, or the full package (source + makefile + executable)
here
.
Release notes
2.2 -> 2.3
-
Fix loss of digits when pushing a double onto the stack.
-
Push max double value onto the stack when double is 'inf'.
-
Add hpd_rcl_ident
-
Add hpd_error
- Add isinf, isnan, isfinite, isneg
- Support handling of 'infinite'
- Improve robustness
2.1a -> 2.2
-
No more "full" and "light" flavours, there is only one libstack.a, thanks to a better organization of hpparser files
-
Add of hps_code_symb for pushing an expression onto the stack
-
Support symbolic within symbolic
-
Add of utilities, currently only util_set_angle and util_get_angle for setting or getting the angular mode of the calculator
2.1 -> 2.1a
2.0 -> 2.1
-
Add of 'hps_list_get_int', 'hps_list_get_uint', ...
-
"Light" variant of 'libstack.a ' : 'libstack_l.a' which does not
contain the HPParser components, so that you'll have smaller executable
if you don't need to handle symbolic expression
-
Built with HPGCC 2.0
1.1b -> 2.0
-
Adapt to HPGCC 2.0 (no stack bias)
-
Built with HPGCC 2.0
1.1a -> 1.1b
-
Fix a bug in hps_list_get (that occured when the requested index was greater by one than the size of the list)
-
Add some robustness checks in hps_obj_get and hps_obj_create_type
1.1 -> 1.1a
-
Add the hpd_rcl_str function that was omitted in 1.1
-
Fix an incorrect return code in hpd_rcl_complex
1.0 -> 1.1
-
Fix a bug in hps_push_array (was pushed as a list)
-
Authorize conversion from real to int and complex to real (when imaginary part is null)
-
Add dir access support (hpd_rcl_...)
Reference documentation
The reference documentation generated by
doxygen
is available
here
.
Examples
Some examples that illustrate how to get data from the RPL stack are presented
here
, and some others illustrating how to create data and push them on the RPL stack are presented
here
.
The examples are included in the package you can
download
.
Examples for hpd_rcl_... features should come soon ...
User's manual
Hope it's not necessary ...