Posts: 7
Threads: 1
Joined: Jan 1970
your first question sounds like a subroutine.. use XEQ C for this (same as GSB C on older machines).
ISG = increment; skip if greater than
DSE = decrement; skip if less than or equal to
you would use e.g. ISG A where A is a variable, as the BASIC
FOR var=initial-value TO final-value STEP increment
A has the following format:
+/- ccccccc.fffii
where ccccccc is the current counter
fff is the final counter value
ii is the interval (unspecified = 1)
so e.g.to loop 10 times
L01 LBL L
L02 1.01
L03 STO Z
M01 LBL M
M02 ISG Z
M03 GTO M
M04 RTN
it's a little complicated; it's best to experiment.
The above definitions and program are taken from the HP32sII manual.
If there is sufficient demand I would be interested in writing a short article on this and related programming features on the 32sII.
Kelvin