The Museum of HP Calculators
HP Forum Archive 01
[ Return to Index | Top of Index ]
|HP48SX LOOP PROBLEM.|
Message #1 Posted by Tal. on 11 Nov 1999, 5:25 a.m.
Hi There, Could someone help me to write an infinite loop for the HP48SX calculator? Best regards, Tal. email: email@example.com P.S. Is it possible to do the loop with a label and a goto like the
HP41 or the other HP calculators?
|Re: HP48SX LOOP PROBLEM.|
Message #2 Posted by Joe Panico on 11 Nov 1999, 8:59 a.m.,
in response to message #1 by Tal.
Those loops are easy. I'll show you some examples (humor included.) They take the general form of:
DO ask question about loop UNTIL answered END
This loop executes at least once. It continues to execute as long as the value of "answered" is zero (0). When "answered" is non-zero, the loop stops.
Another loop is:
WHILE confused REPEAT ask question about loop END
As long as "confused" is non-zero, the loop repeats. Should "confued == 0", the loop never executes and the question is not asked.
Your last method uses no test but does continue.
1 MAXR START ask question about loop on hpmuseum.org forum NEXT
This sets up a loop from 1 to infinity. (MAXR is 9.999e499) Since a test is missing, it keeps going.
Return to Index | Top of Index ]
Go back to the main exhibit hall