The Museum of HP Calculators

HP Forum Archive 14

 17BII and 19BII indefinite loops ?Message #1 Posted by Vincent Weber on 10 Sept 2004, 3:52 a.m. Hi all, I am now diving into the joy of programming the 17BII and 19BII. I discovered the L() and G() functions and what they can bring: (almost) true programmability ! using syntax like 0*L(...)+... allows true instructions steps, multiple equations, and true definite loops which do more than just adding, with the 'sum' function. That's great for a formula-based language. It does not have the power of RPL, but it is cute and well suited to finance people. No wonder why the 17BII and 19BII were hugely succesful, almost as much than the 12C... Btw, it is a shame that HP removed these functions from the 17BII+. They removed what made the power of these calculators, and replaced it by a nice to have, but easy to program, currency converter, 4x the memory which nobody is likely to ever use, a crappy keyboard. The only positive thing I can think of for this machine is the nice, more readable, display... Let's call it the HP-17BII- !! Anyway, I was wondering a few things about the 17BII/19BII world: 1/Is there a way to do indefinite loops, i.e. to break a loop when the number of times to loop is not known a priori? This would be the equivalent of the WHILE/REPEAT structures in a high-level programmming language, and this is extremely useful. I tried to use L(I:N) to set the counter to the maximum value within the loop, in order to break it early, but this does not work. It seems that the calc is treating this 'I' as a new variable, and not as the counter. Any idea ? This feature is the only programming feature that a Casio FC-200 or a 12C can do, that the 17BII/19BII cannot do... 2/Is there a way to uset the S() function to have 'subroutines', i.e. to force the solver to call an equation with different parameters, automatically, without user input ? I tried to use something like 'IF(S(F):L(F:SQ(X)):0*L(X:2)+G(F)+0*L(X:3)+G(F))' to 'call' the 'F' function (X^2) on '2' and then '3' arguments to get their sum, but this just failed. 3/Is there any reason why the 19BII has the built-in TVM functions (PV, PMT, FV, I, N) accessible from the solver, while the 17BII can't ?? This would be useful for some financial programming. Anyway, long live the L() and G() functions, and let's wish HP will bring them back in a real 17BII+... Cheers, Vincent

Go back to the main exhibit hall