Loops on 48GX



Post: #2

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.


Post: #3

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


Post: #4

Thanks Raymond. I'll try to get hold of a manual.

VG


Post: #5

Hi,

much valuable information, including manuals,

can be found on www.hpcalc.org

Raymond


Forum Jump: