Posts: 11
Threads: 5
Joined: Nov 2006
I'm looking for some help re loops within a program. Here's the scenario:
A few steps into a program the 48GX performs a long mathematical procedure. Several steps later I want it to perform the same procedure using new numbers by looping back through it. How do I do this?
As a simple example:
1, 2, 3, 4, 5 and 6 are stored as a, b, c, d, e and f. How do I get the program to add a,b and c, then add d,e and f using a loop?
Thanks.
Posts: 1,841
Threads: 54
Joined: Jul 2005
A simple answer would be:
Place d,e,f,a,b,c on the stack, and do the following loop:
1 2 START
+
+
NEXT
The code between the START and the NEXT statements
will be executed two times.
This is a RTFM-type, so for more details
I'd suggest reading the manual;-)
Raymond
Posts: 11
Threads: 5
Joined: Nov 2006
Thanks Raymond. I'll try to get hold of a manual.
VG
Posts: 1,841
Threads: 54
Joined: Jul 2005
Hi,
much valuable information, including manuals,
can be found on www.hpcalc.org
Raymond